It’s been a while since I wrote my last dynamic block tutorial. Besides of using parameters and actions, there is one thing left: using visibility states. You can hide and show some (or all) objects and save them on separate visibility state.
Let’s take a dynamic block sample from AutoCAD. I use the trees block. Insert it to your drawing, and click the down arrow in the block. You will see a list of trees. Try to change it to other type of tree.
What it does is hiding objects that form the palm (plan) and show other objects. Let’s try to create our own visibility states.
These doors are actually have a same door type. The only difference is the door on the left can be opened to inside and outside. And the other one can only be opened to one direction.
*What do you call them? single swing and double swing door?
Create a drawing like the door on the left. Make it as a block. Then open it in block editor. You’ve been doing this several of times, haven’t you? :)
We can’t click any button in visibility panel yet. To enable the visibility states, we need to place visibility parameter first. You can find it in block authoring palette, parameters tab.
Place it near your block. Pick a good spot, so you and others who will use it can find it easily.
Click the visibility states button. The visibility states dialog box will open.
By default, we will have one visibility state with name VisibilityState0. Select it, and click rename. Rename it to double swing door (or something you prefer).
Click new to create a new visibility state. Give it name single swing door. And make sure you select the leave visibility of existing objects unchanged in new state. Click OK.
AutoCAD will automatically set the new visibility state as current. If the single swing door is not current, select it and click set current. Click OK to close the dialog.
Now we will hide some lines. Activate make invisible from your ribbon.
Select all the dashed line that showing the door swing. [enter] to accept.
Click visibility mode to see/hide the invisible lines as opaque lines or hidden. You may want to set it as hidden to see applied changes clearly. But sometimes you need to see the invisible objects when you need to change it to visible.
Test your visibility state. Change it from one to another in visibility state list.
If everything is working fine, you can save the block and close the block editor.