(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)
Monday, January 07, 2008
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!