;Generate a sorted list of layer names in the drawing. ; ; The list is written to a ; file named .LAY in the current directory. ; The list can be viewed in AutoCAD by entering ; !newlist at the command prompt. A page by page ; listing can be viewed by entering LLIST after the ; lay_list routine has been run. ; ; ; AUTHOR: HENRY C. FRANCIS ; 425 N. ASHE ST. ; SOUTHERN PINES, NC 28387 ; ; All rights reserved without prejudice. ; ; Copyright: 4-28-96 ; Edited: 4-28-96 ; (defun c:laylst ( / it itn lay_f lay_str) (progn (setq it (tblnext "layer" "T")) (setq itn (cdr(assoc 2 it))) (setq newlist (list itn)) (while (setq it (tblnext "layer")) (progn (setq itn (cdr(assoc 2 it))) (setq newlist (append newlist(list itn))) );progn );while (setq newlist (acad_strlsort newlist)) (setq lay_f (open (strcat(getvar"dwgname")".LAY") "w")) (foreach n newlist (write-line n lay_f)) (close lay_f) );progn );defun (defun C:LLIST ( / ) (foreach n newlist (princ (strcat "\n" n))) (princ) );defun