Jump to content

Block Dynamic


Madruga_SP

Recommended Posts

  • Replies 35
  • Created
  • Last Reply

Top Posters In This Topic

  • Madruga_SP

    16

  • steven-g

    11

  • drafting3

    4

  • dbroada

    3

Ok I changed it so you can see what is going on.

Look in the block editor, the attribute -titulo has the properties "Lock position" & "Invisible" set to yes, it is also visible in both visibility states. This is the attribute that prompts you to enter the title of the drawing when you insert the block, but it doesn't actually show up on screen (hence the invisible) this is your reference attribute and needs to be turned on in a visibility state so it can be read. The two attributes "Title1" & Title2" control the title text in the two visibility states both of them have properties set to "Lock position" and "Preset". The preset means that they do not prompt for user input when the block is inserted.

 

In the block editor in these last two attributes the default in the attribute dialogue box (double click the attribute to open it) is created by inserting a field it actually shows as "----" because it has no value at the moment. Delete one of them, and I'll try to show you how to do it.

 

Right click in the default box and select insert field. In the field dialogue that opens select "object" from the left column (you might need to scroll to find it). The dialogue will change, next click on the select object icon at the top center of the dialogue, this will close the dialogue so that you can select an object, pick the attribute called -Titulo, the field dialogue will automatically open again and the center column will now be populated with all the attributes properties scroll down and select "value" from the list then click ok. The attribute dialogue will reappear with the four "----" click ok and thats it.

 

This method allows an attribute to read the value of another attribute in the same block. So now you can do the same for all the other attributes.

Just remember the reference attribute needs to have it's property set to invisible but needs to be visible in all visibility states, any other attribute reading this reference needs to have the preset property set to yes (select the attribute and look in the properties manager - scroll down to find the preset value), if you don't do this then when the block is entered the field will be overwritten.

 

Now the fun bit, insert the block and -Titulo will prompt you for the value (you can fill the prompt text back into the attribute I deleted and didn't know what to put in there). The block is inserted and the Title says "----", when you update the block with all the other attributes they will all read as "----", this is just how it works, in order for the block to start reading what is in the reference attributes you need to dynamically alter the block, you can either use the stretch action or change visibility states it doesn't matter, and then "regen" your drawing. If you have done everything correctly the values will appear.

 

You can change the values of the reference attributes in the properties manager and all you need do then is "regen", after the first time there is no need to change a dynamic property, unless you need to.

 

Sorry for the length of this post, and I'll take a guess that you might get stuck somewhere. So just shout if you need help (but it is weekend) Good luck.

test.dwg

Link to comment
Share on other sites

Hi Steven, sorry for delay

 

I really appreciated your help...

 

I've learned so much with your excellent tutorial!

I understood everything you said and worked great.

 

Thank you very much

 

Regards

:)

Link to comment
Share on other sites

Hi my friend,

How have you been?

 

I'm having trouble with my dinamic block and I need your help...

In the block editor the visibility state works good, but when I test it don't

 

Could you help see where the problem is, please??

 

Thank in advance

block test.dwg

Link to comment
Share on other sites

  • 1 month later...

Hi steven-g,

 

I have used this method to automatically fill in parts of my title block, and it didn't work the way I wanted it to. If I have an attribute referencing another attribute (fill in one, it fills in the other), I don't want to see them both in the attribute list when I insert the block. It keeps asking me to fill in the duplicate attribute.. Any reason you can think of?

 

Please let me know if you are unsure of what I mean.

Edited by drafting3
Link to comment
Share on other sites

Inside the block editor, select the attribute, and then in the properties manger make sure that "preset" is set you yes, that stops the promt for a value when you insert a block. If you still have problems then post a copy of the block.

Link to comment
Share on other sites

Hi steven-g,

 

Please find attached the unblocked title block. I will let you block it so that you see my issue.. The lines "Your Initials" & "Project Manager" appear twice when inserted, I am trying to stop this from happening..

 

Please let me know if it didnt attach properly, I had some trouble with it.

Title Block (forum).dwg

Link to comment
Share on other sites

Having more than one Tag with the same value, will stop the attributes working correctly, and is never a good idea, so rather than using ? as a Tag name, you need to change those to something meaningful and unique.

The only attributes that need to be preset are the ones that you don't want to prompt for values when you insert a block, so check those, and finally in order to get the attributes to take on the value of another attribute in the same block you need to perform a dynamic action action on the block after it has been inserted (but it only needs to be done once), so a visibility state or a stretch.

You are nearly there, but blocks are really fussy about small details. Let me know if you have any problems, and also if you get it going :)

Link to comment
Share on other sites

"and finally in order to get the attributes to take on the value of another attribute in the same block you need to perform a dynamic action action on the block after it has been inserted (but it only needs to be done once), so a visibility state or a stretch."

 

Could you please explain this on a little more for me? Does it mean that there is another step involved once I've inserted the block & filled in the information?

 

I have it working! Once I insert the border it all works perfect, thanks heaps! But your comment (shown above) has me a little concerned..

Edited by drafting3
Got it to work, but am worried about something else
Link to comment
Share on other sites

I have it working! Once I insert the border it all works perfect, thanks heaps! But your comment (shown above) has me a little concerned..

I hope you do have it working. Once a block is working and 2 attributes are linked then it is great you can change one attribute and the other automatically follows, you can copy the block and copies also work just fine, but normally when you insert the block the second attribute doesn't work, it usually shows ----, not sure why it does that but it does, however someone sometime found that after a dynamic action is performed then the second attribute kicks in, but that dynamic action doesn't really have to do anything, you can put in a visibility state and swap states or a stretch action that actually only stretches itself, but it needs to have some action performed. Anyway glad to hear you have it working.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...