Jump to content

attributes and visibility states in dynamic block


dbroada

Recommended Posts

This isn't a "how do I get this to work" but more a "why is this working?" question.

 

In the past I have not managed to get attributes to constantly behave themselves if I applied a visibility state to them. Following posts by steven-g where he has a method to get them working together I thought I would give it another try. His method was used to link the attributes to a further reference attribute to reveal a field but mine is far simpler, just requiring one of two numbers to appear depending on the project state.

 

I had two attributes which toggled their visibility but only the primary attribute would display UNTIL AFTER I locked and prest the attributes, wherein it all looks to be working as wanted.

 

So my question is, why does it now work (and will it continue to do so)?

 

I don't know if I could get away with only one of those actions but since I had something working I didn't want to break it. I will test it once these drawings have cleared my desk.

Link to comment
Share on other sites

When a block is inserted, the attributes are either populated by prompting for a value, or they have a preset value which is read from the block definition. I don't fully understand the working of it. But it appears that if you have an attribute set up to read the value from another attribute in the same block, that on insertion it is actually looking at the values stored in the block definition. The trick is to perform a dynamic action on the block (any dynamic action will work I just pick on the visibility state), this nudges the block awake and makes the values work correctly, you need to regen but it works, you only need do the dynamic action once, after that changes to the host attribute will always reflect into the copy attribute after a regen.

If you then make a copy (or copies) of this block it will work just fine as well, this trick is only needed when you insert a block

Link to comment
Share on other sites

Thanks.

 

In my case I am redefining an existing block (using design centre) and then ATTSYNCing it to get the new attribute in. In this case I have to toggle the visibility to get the newer value to appear. I hadn't really thought of the preset being part of the block definition but that does make sense, at least to me even if that is not how it is really working.

 

Did you discover this action all by yourself or did something point you in that direction in the first place?

Link to comment
Share on other sites

It came originally from the dark side, not sure exactly where it originated, but a lot of credit should go to a certain MR.C.Shade who at one point gave me a good understanding of the process

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...