View Full Version : All layers but current
tflaherty
2005-06-02, 06:49 PM
Does anybody have a simple routine to off all the layers but the current one?
Thanks
Does anybody have a simple routine to off all the layers but the current one?
Thanks
There is a routine to do such a thing with the express tools, if you have them.
tflaherty
2005-06-02, 07:45 PM
Yes, but can I use it inside another LISP routine?
(command "-layer" "off" "*" "n" "")
madcadder
2005-06-02, 08:10 PM
All but the current off...
(DEFUN c:alloff (/ |clayer|)
(SETQ |clayer| (GETVAR "clayer"))
(COMMAND "-layer" "off" "*" "n" "")
(PRINC)
)
madcadder
2005-06-02, 08:27 PM
If ON layer needs to be selected.
(DEFUN c:pickalloff (/ |ent| |layer|)
(PROMPT "\nPick entity on layer to remain ON: ")
(SETQ |ent| (ENTGET (CAR (ENTSEL))))
(SETQ |layer| (CDR (ASSOC 8 |ent|)))
(COMMAND "-layer" "set" |layer| "off" "*" "n" "")
(PRINC)
)
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.