;;; Isolate layers using wild cards
;;; (Henrique's routine)
;;; Saved from http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-to-isolate-layers-using-wildcards-in-the-name/td-p/6065074

(defun c:lf ( / laynames ss)
(if (and (setq laynames (getstring T "\nEnter Layer Name(s) to isolate 'wild-cards can be used': "))
(setq ss (ssget "_X" (list (cons 8 laynames) (cons 410 (getvar 'CTAB)))))
)
(command "_.layiso" ss "")
(prompt (strcat "\nNo objects found in layers " laynames "... "))
)
(princ)
)
(c:lf)

Advertisements