SuperCAD Posted December 19, 2021 Posted December 19, 2021 Need some guidance on this one. I'm looking to use layer states to more easily freeze/thaw layers in the viewports on our sheets, but sometimes we have to add (or remove) XREF files that would add layers that didn't exist when the states were created. Since the layers are frozen or thawed per individual viewports, and a state would be created to show only the layers needed, it would be great if there was a way to automatically add the new layers to an existing state. The layers in each of the files would all be the same, so filtering them should be easy, but I can't find anything that would do what I want/need. I even tried looking on the website of the legendary programming guru, Lee Mac, for a reactor that might do it, but I didn't see anything obvious. I understand that this may not be possible at all, but if anyone has a suggestion or a tutorial to point me to, I would really appreciate it. Quote
tombu Posted December 19, 2021 Posted December 19, 2021 All my Layer States are for groups of layers like that. Keeping "Turn off layers not found in layer state" unchecked under "Restore options" and the "Layer States Manager" will do as you want. I've added (vl-load-com) (vl-registry-write (strcat "HKEY_CURRENT_USER\\" (vlax-product-key) "\\Profiles\\" (getvar "cprofile") "\\Dialogs\\AcLayerApps:LayerStatesManager") "LayerNotFound" "0") to my acaddoc.lsp file to make sure it's set that way every time I open a drawing. Unfortunately the "Layer State Ribbon Combo Box" drop-down doesn't recognize that setting. You have to use the "Layer States Manager". You can add the "Layer States Manager" to the "Quick Access Toolbar" by clicking the down-arrow and selecting "More Commands…" searching for "Layer States", then dragging and placing it on the "Quick Access Toolbar" where you want it. Quote
Recommended Posts
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.