Layer Set by Pick Lisp
Looking for a quick way to set a layer active? Why not pick an object that already exists on that layer! The following lisp code does just that! (defun c:ls () (while (not e) (setq e (entsel))) ;get layer of item picked (setq lyr (cdr (assoc 8 (entget (car e))))) (command "-LAYER" "set" lyr "") (setq e nil) ) Labels: ACA, ADT, AutoCAD, CAD Management, Lisp







