Is there a way to make a Layer current just by
picking an object from the drawing?
;CODING STARTS HERE
(defun C:MLay ( / entity name layername)
(setq entity (car (entsel)))
(setq name (entget entity))
(setq layername (cdr (assoc 8 name)))
(setvar "clayer" layername)
(princ)
);defun
(princ)
;CODING ENDS HERE
Save this as MLay.lsp
|