Dynamic block attributes in visibility states

Dynamic block attributes in visibility states

mathomas
Participant Participant
2,317 Views
4 Replies
Message 1 of 5

Dynamic block attributes in visibility states

mathomas
Participant
Participant

Greetings and good day,

 

I am trying to develop a block with various attributes in different visibility states. Having a tough time at it. I want to develope a template file that will contain many dynamic blocks I can insert and be capable of changing visibility states and then extract data from the final visibility state I choose for that drawing. It seems to be difficult to find any tutorial that will outline each step from creating the block and its visibility states to assigning attributes to each visibility state and then on to the steps to creating an extraction template and data link. I want to make it simpler to create designs and extract data into a table used to show bill of materials.... Anyone know of a tutorial for this? The trouble is finding something that will circumlocute all the dialogue between steps. Something simple without all the explanations....

 

I have created a block with visibility states I have attached hereto. As you will see I have for states. state 0 shows just a CHANNEL C6 Then there is the HOLE NO LIP STATE, the CLIP NO HOLE STATE AND THE CLIP W HOLE STATE. 

 

i WANT TO BE ABLE TO ASSIGN ATTRIBUTES TO EACH STATE SO I CAN EXTRACT THE DATA FOR THE MATERIAL FROM THE FINAL STATE I CHOOSE.

 

Not sure how to get it to work. Do I need to create and nest several blocks with attributes before creating the final block to create the visibility states or create on block with visibility states and then assign the attributes on each visibility state for this to work?

 

 

Thanks in advance.

0 Likes
2,318 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable

U can make all the attributes in ur block and set them in the corresponding visibility state.

All attributes can be seen in the properties manager even when they are in a different state.

u should get all the info u want when u make a data extraction from the block, although i havent tested that yet.

0 Likes
Message 3 of 5

MMcCall402
Mentor
Mentor

Our office is still on 2015 so I can't look at the block right now, however I think I understand where you need to go.

 

Step 1, build the block with the intent for data extraction later on.

 

You have a part that comes in 3 varieties, each is graphically different and you've already figured out how to handle that with visibility states.  Now you want information, attributes, related to each of those states that you can harvest with a data extraction to retrieve information of each part in its current visibility state.  Rather than an attribute in each state you can make an attribute for each type of information needed and have the value of that attribute change with each chose viability state.  The parameter for making that correlation is a Block Properties Table. Add the visibility state to the table first, then the attributes. The table operates from left to right so a selection in the first column selects the row of values. This will allow you to specify the value of the attributes as they relate to each visibility.

Mark Mccall 
CAD Mangler


EESignature


VHB - Engineering, Inc.

0 Likes
Message 4 of 5

steven-g
Mentor
Mentor

You need to put the attribute relating to the visibility state in that visibility state. Any of them like Length that need to be made visible in all the states just need to be made visible in all states. You then use fields in the value portion of the attribute to read information from the geometry within the block. Any value that uses a field needs to be set as "preset" so that you are not prompted to enter a value when the block is inserted which would overwrite the field. If you need different values for each vis state then you have to have different attributes and these have to have unique names, for example, "material" if it is the same for each visibility state then make it visible in all the states, but if it has to be different for each state then it has to be separate attributes for each state - 

Material Vis1

Material Vis2, etc

you cannot have different values in an attribute depending on the visibility state and you cannot have the same tag name in multiple attributes placed on different visibility states (you can actually do this but Autocad can't recognise them). 

 

If you give a bit more detail on how exactly this information is to be used in the various visibility states I'm sure someone would be able to help you lay out the attributes correctly

0 Likes
Message 5 of 5

MMcCall402
Mentor
Mentor

Attached is a little sample part I threw together with ver. 2016 with some simple geometric shapes of various colors and a few attributes to illustrate how visibility states and attributes can work together.

 

The block has a grip on the left for some simple scaling in limited increments and an attribute to show the current scale (size)

 

The grip on the lower left is a visibility state, the grip on the lower right is the block property table. The block can be controlled by either grip. I included grips on both of them for illustration but you really only need the block table in this instance. Selecting a visibility state will trigger a matching row in the block property table and supply values to the attributes.  You can also select from the block property table and it will trigger the visibility state from the selected row.

 

I included the option for the triangle shape to be available in two colors to show how a block property table can cascade its menu to get to a unique selection.

 

The table can include other parameters and drive the size, shape, rotation, etc of the block parameters.

 

You can set up the block property table like a parts catalog.  I've even copied and pasted part values from an actual catalog into the table rather than retyping.  

Mark Mccall 
CAD Mangler


EESignature


VHB - Engineering, Inc.

0 Likes