I use these:
Generic macro:- ;MAKE A LAYER(defun c:LM () (command "-layer" "make" ) (princ))
Quick dummy layers and will put preselected objects on layer:
- (defun AT:DummyLayer (name color plot / ss) (setq ss (ssget "_I")) (cond ((eq (strcase name) (strcat (getvar 'clayer))) (princ (strcat "\nLayer: "" name "" is the current layer.")) ) ((tblsearch "layer" name) (vl-cmdf "_.layer" "_t" name "_s" name "_p" plot name "") (princ (strcat "\nLayer: "" name "" is the current layer.")) ) ((vl-cmdf "_.layer" "_m" name "_c" color name "_p" plot name "") (princ (strcat "\nLayer: "" name "" has been created.")) ) ) (if ss ((lambda (i / e) (while (setq e (ssname ss (setq i (1+ i)))) (vla-put-layer (vlax-ename->vla-object e) name) ) (princ (strcat "\n" (itoa (sslength ss)) " object(s) moved to layer: "" name """)) ) -1 ) ));"ALAN" LAYER(defun c:ALAN (/) (AT:DummyLayer "ALAN" 2 "P") (princ));"TEMP" LAYER(defun c:TEMP (/) (AT:DummyLayer "TEMP" 7 "P") (princ));"DEFPOINTS" LAYER(defun c:DEF (/) (AT:DummyLayer "Defpoints" 7 "N") (princ));"VP" LAYER(defun c:VP (/) (AT:DummyLayer "VP" 4 "N")(princ));"HIDE" LAYER(defun c:HI (/) (AT:DummyLayer "HIDE" 210 "N")(princ));"0" LAYER(defun c:L0 (/) (AT:DummyLayer "0" 7 "P")(princ))
|