;;;save layer name, color, linetype. ;;; ;;; ;;; ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 4-28-96 ;;;> EDITED: 08-18-1999 ;;; (defun c:lclt ( / vl_list newlist) (progn (setq cur_lay (getvar"clayer")) (setq it (tblnext "layer" "T")) (setq itn (list(cdr(assoc 2 it))(cdr(assoc 62 it))(cdr(assoc 6 it)))) (setq newlist (list itn)) (while (setq it (tblnext "layer")) (setq lname (cdr(assoc 2 it))) (setq lcolor (cdr(assoc 62 it))) (setq lltyp (cdr(assoc 6 it))) ; (if lcolor nil ; (setq lcolor (strcat "BYLAYER="(itoa(cdr(assoc 62 laent))))) ; ) ; (if lltyp nil ; (setq lltyp (strcat "BYLAYER="(cdr(assoc 6 laent)))) ; ) (progn (setq itn (list lname lcolor lltyp)) (setq newlist (append newlist(list itn))) );progn );while ; (setq newlist (acad_strlsort newlist)) );progn (foreach n newlist ; (if(not(wcmatch (car n) "*|*")) (if vl_list (setq vl_list (append vl_list (list n))) (setq vl_list (list n)) ) ; ) ) ; (setq cur_ndx (-(length vl_list)(length (member cur_lay vl_list)))) (setq lay_f (open (strcat(getvar"dwgname")".LLT") "w")) (foreach n vl_list (print n lay_f)) (close lay_f) ) (defun c:rlclt ( / rline_lst) (setq fname (ustr 1 "Layer Template Filename" (if fname fname (getvar"dwgname")) nil)) (while (not (setq ffname (findfile fname)) (princ "\nFile not found, Please enter a valid name. ") ) ) (setq lay_f (open ffname "r")) (while (setq rline (read-line layf)) (if rline_lst (setq rline_lst (append rline_lst rline)) (setq rline_lst (list rline)) ) ) )