- Add the contents of the ARCHLAYER.LSP into your acad2006.lsp file.
- Create a Xcel sheet with the following info: column 1 - layer name plus 0001 and so on column 2 - color 1 red 5 blue 2 yellow 6 magenta 3 green 7 white 4 cyan column 3 - the linetype (use CN for Continuous) column 4 - the status of the plot style (just put Y) Example: | test001 | 1 | CN | Y |
- Create new sequencial layer name in Xcel by selecting your first layer name in column one and then dragging downward the bottom right corner of the cell. This will automatically create the new sequencial layer name.
- Save the file as a NEWLAYERS.CSV file. Example: test0001,1,CN,Y test0002,2,CN,Y test0003,3,CN,Y test0004,4,CN,Y test0005,6,CN,Y test0006,1,CN,Y test0007,2,CN,Y test0008,3,CN,Y test0009,4,CN,Y test0010,6,CN,Y
- Get rid of hidden character in the Xcel file and as the final CSV file. Open the NEWLAYERS.CSV file with Microsoft Word. Select all the text and then paste it into Note Pad and save the file as ARCHLAYERS.csv into your autocad support directory(ex: C:\Program Files\Autocad 2006\support).
- Import the new layers. In autocad, issue the command: Command: ala Architectural Layers Loaded...! If you made a mistake in your CSV file, you will get the options prompt instead. If you have other layers in the drawing, this tool will only add the new layers into the drawing.
-----------------------------------------------------------------------------------
;;;CADALYST 05/04 Tip1951: ARCHLAYERS.LSP Layer List ;;; (c) 2004 Theodorus Winata ;;; ;;; ;;; Command name: ALA ;;; The command generates Architectural layers. ;;; To meet your drawings layering names, edit ;;; ARCHLAYERS.csv. ;;; ;;; ;;; Developed by Theodorus Winata ;;; March 2003 ;;; 1024-89 Avenue SW ;;; Calgary, AB. T2V 0W4 ;;; CANADA ;;; ;;; (defun C:ALA (/ CHAR CME CNT COL LAY LLS LTP PLT RGM RLI) (defun *error* (msg) (princ msg)) (setq CME (getvar "CMDECHO") RGM (getvar "REGENMODE") CNT 0 LLS (findfile "ARCHLAYERS.csv") LAY "" COL "" LTP "" PLT "" );;setq (setvar "CMDECHO" 0) (setvar "REGENMODE" 0) (if LLS (setq LLS (open LLS "R")) (alert "\nLayers List not found!") );;if (if LLS (while (setq RLI (read-line LLS)) (setq CNT 1 CHAR t );;setq (while CHAR (setq CHAR (substr RLI CNT 1)) (if (/= CHAR ",") (setq LAY (strcat LAY CHAR)) (setq CHAR nil) );;if (setq CNT (1+ CNT)) );;while (setq CHAR t) (while CHAR (setq CHAR (substr RLI CNT 1)) (if (/= CHAR ",") (setq COL (strcat COL CHAR)) (setq CHAR nil) );;if (setq CNT (1+ CNT)) );;while (setq CHAR t) (while CHAR (setq CHAR (substr RLI CNT 1)) (if (not (or (= CHAR ",") (= CHAR ""))) (setq LTP (strcat LTP CHAR)) (setq CHAR nil) );;if (setq CNT (1+ CNT)) );;while (setq CHAR t) (while CHAR (setq CHAR (substr RLI CNT 1)) (if (not (or (= CHAR ",") (= CHAR ""))) (setq PLT (strcat PLT CHAR)) (setq CHAR nil) );;if (setq CNT (1+ CNT)) );;while (if (= LTP "CN") (setq LTP "Continuous") );;if (if (= PLT "Y") (setq PLT "Plot") );;if (command ".-layer" "make" LAY "color" COL LAY "ltype" LTP LAY "P" PLT LAY "") (setq LAY "" COL "" LTP "" PLT "") );;while );; if LLS (command "-layer" "set" "0" "") (close LLS) (setvar "CMDECHO" CME) (setvar "REGENMODE" RGM) (princ "\t\tArchitectural Layers Loaded...!") (princ) );;C:ALA