I tested this before I used the lookup. I notiiced I needed Lookups to change states.
For me the states weren't changed when I selected another Visibility State option/parameter, somehow it remembers the state of the Lookups combined (added by AutoDesk, so it works at every version) and not the states of the visibility parameters combined.
It then looks like every Lookup is combined with a different Visibilty State Parameter (VSP), just because it remembers the value of the lookup.
And lookups give you more flexibilty to separate things and give it a user friendly name. Especially when the names must be UNIQUE! ! !
Unique values in Lookups:
I tested it with points in a Lookup too: it must be unique! Even adding the Y values wasn't enough. X for the lookup action (same values), Y for the Lookup sequence (0 = Lookup A, 1 = Lookup B, etc.)
So I used the VSP-values in the Lookups.
New test-method to separate the Visibilty State Parameter(s) (VSP) and make it easier
When this works, it is OOP (Object Oriented Programming) just build modules of blocks (then you can use other parameters as well to do the same):
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I'm going to test with dynamic subblocks in a dynamic head block: the visiblity parameter stores handles for every state, so it should work to show/hide objects: every Lookup his own block and Visibilty State Parameter (VSP). Handles are unique and don't change while in the same drawing.
I need to (tested before with my Excel-file to add states and lookups to the right object):
- Add a VSP in the headblock, rename it to the VSP_Blockname_Head (always needed).
- Add a Lookup with the VSP_Blockname_Head values (always needed)
Option 1:
- Add VSP in the subblock and make the states. Rename to VSP_Blockname_Sub
- Hide other object off in the Default State.
- DXFout and edit it with Word, Wordpad, Notepad.
- Search for VSP_Blockname_Sub.
- Remember the value of key 91 (amount of Visibility State): next line.
. - Copy the section to my clipboard with 303 keys and values. Next key is 304.
- Seardh for the VSP_Blockname_Head name
- Change the value of key 91 to the one of the VSP_Blockname_Sub: next line
- Select the 303 key and value, just before reaching key 304.
- Paste from my clipboard and hide the other objects in the Head Block later.
- Combine the values Standard State of VSP_Blockname_Head and VSP_Blockname_Sub
- Save the DXF as plain text and open with AutoCAD.
- Option 2: Create a function in Lisp/VBA/.Net to synchronise the VSPs. between the Sub and Head block.
- Option 3: Being able to select subentities in the subblock, while in the blockeditor before using BVShow/BVHide.
- Option 4: Or using Refedit to move objects from one block to another.