Dynamic Blocks - Linking a block attribute to visibility state

Dynamic Blocks - Linking a block attribute to visibility state

Walshyrigger
Participant Participant
5,794 Views
14 Replies
Message 1 of 15

Dynamic Blocks - Linking a block attribute to visibility state

Walshyrigger
Participant
Participant

Hi,

I am using a dynamic block with several visibility states.  The block has several attributes common to all visibility states, and I would like to link one of these attributes to the visibility state, so that when I change visibility state, the attribute changes automatically to match.

Is this possible?

0 Likes
Accepted solutions (1)
5,795 Views
14 Replies
Replies (14)
Message 2 of 15

h_s_walker
Mentor
Mentor

Yep, just change the relevant attribute to a field and choose the visibility state.

 

See the attached drawing.

 

Note: It will require a regen to update

 

EDIT: Just updated the drawing. You can also do it with a simple text object in each visibility state with the name in there.

 

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 3 of 15

Walshyrigger
Participant
Participant

Thanks for the info.

I have done this, i think, but it still won't update the attribute when I switch vis states.

I wonder if you could cast your eyes over the attached block and confirm whether or not I have implemented it correctly.

I am normally an AutoCAD MAC user, so I may have missed something.

PS I edited and tested the Block in Autocad Windows 2019.

 

Thanks

0 Likes
Message 4 of 15

h_s_walker
Mentor
Mentor
Accepted solution

You didn't "INSERT A FIELD" as the default value. See the attached drawing. Don't forget you need a regen.

 

Or you could make a whole load of text objects with the individual name and make them visible in the relevant viewport and invisible in all others.

 

 

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 5 of 15

heather_o
Enthusiast
Enthusiast

This has been very useful!  I just had a quick question.  I have 3 title blocks in my dynamic block.  I have created fields on 2 of them referencing back to the first one.  So if I need to change between the 3, the subdivision name, etc, changes with the block.  But the attribute from title block #1 is showing up on blocks #2 and #3.  How do I remove the attributes from the first title block and only see the fields?  The attributes/fields are in different locations on each block.

0 Likes
Message 6 of 15

h_s_walker
Mentor
Mentor

Post your blocks so we can have a look at them to better help you

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

0 Likes
Message 7 of 15

heather_o
Enthusiast
Enthusiast

I started with DATE1 and Subvision, address....

0 Likes
Message 8 of 15

Libbya
Mentor
Mentor

In order for an attribute to function properly within a dynamic block it must have its property 'lock position' = 'yes'.  All of yours are set to 'no'.  All attributes muse also have unique tags.  It looks like yours do.

0 Likes
Message 9 of 15

heather_o
Enthusiast
Enthusiast

That solved 1 issue!  Thank you so much!  I created a field on 2 of the visibility states referencing the attribute on the first state.  Is this doable?  When I enter the subdivision name, for example, and need to switch states, I want to the name to auto update on all.  I regen and nothing happened.  

0 Likes
Message 10 of 15

Libbya
Mentor
Mentor

That is certainly doable.  You did not post the current version of the block so I cannot diagnose the issue.  When doing what you describe I typically have the 'master' attribute 'visible' in all visibility states, but with the property 'invisible' set to 'yes'.  I then use a field in each of the visibility states referencing that attribute.  Post the block again if you would like further diagnostic assistance.   

0 Likes
Message 11 of 15

heather_o
Enthusiast
Enthusiast

please see attached.  I'm confused on how to make it "visible".  I see where to make it "invisible"

0 Likes
Message 12 of 15

Libbya
Mentor
Mentor

I do not believe that you can use a field value within a text object to reference a changing attribute value.  It will only show the attribute value as defined in block editor and any updates to the attribute after block insertion will not show.  In order to show the changing attribute value, the field must be housed in another attribute, not a text object.  See screencast:

 

 

Message 13 of 15

heather_o
Enthusiast
Enthusiast

Thank you so much!  I'm going to watch this several times and try it.  I will keep you posted!!  

0 Likes
Message 14 of 15

heather_o
Enthusiast
Enthusiast

after you did ADDRESS_WEST...How did you do ADDRESS_WEST_SIDE?  I see you copied it, but then I couldn't see exactly.  I did copy with a base point but then it kept showing up on the West state 

0 Likes
Message 15 of 15

Libbya
Mentor
Mentor

I ran into the same issue at first.  As a solution, I then went to the visibility tab of the ribbon and I selected the Visibility Mode button.  It makes all items in all states visible.  I then used the COPY command.  Any items you copy in that manner are placed in the current visibility state.  

0 Likes