fonte
(defun c:loff ( / l )
(setq l
(mapcar 'strcase
'( ;; Layers to keep ON:
"LAYER1"
"LAYER2"
"LAYER3"
)
)
)
(vlax-for x (vla-get-layers (vla-get-activedocument (vlax-get-acad-object)))
(if (member (strcase (vla-get-name x)) l)
(vla-put-layeron x :vlax-true)
(vla-put-layeron x :vlax-false)
)
)
(princ)
)
(vl-load-com) (princ)