Message 1 of 3
Lisp Routine to Toggle Freeze/Thaw of Specific Layers

Not applicable
04-03-2017
05:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am a novice at writing lisp routines and I having having trouble trying to figure out how to come up with a routine to toggle certain layers to freeze/thaw.
In our drawings we have both 2D and 3D layers. I want to be able to toggle frozen/thawed 3D layers, however there are two 3D layers that I need to always remain thawed (3D_ITEM & 3D_PRODUCT).
Currently, I have two commands that will do this. F3D and T3D
(defun c:f3d()
(command "-layer" "f" "3D_*" "")
while
(command "-layer" "t" "3D_ITEM,3D_PRODUCT" ""))
(defun c:t3d()
(command "-layer" "t" "3D_*" ""))
I'm just unsure of how to be able to use those in a single toggle routine so I can store it in a button on a toolbar.
Any help would be greatly appreciated.