Create sequencial layers automatically

Hi,
I need to create about 500 layers and I'd rather not do it manually. They need to have a specific name with a unique sequencial number in
the name. Also, the colors need to alternate between about 4 colors. Is there such a free lisp tool or one that I can buy? TIA.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
try http://cadmechanic.com/programs.htm
rod

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Feb 7, 10:26 pm, "rod cohen" <i_doc<at>comcast.net> wrote:

Or just write one yourself. It might look something like this:
(setq count 1) (while (< count 11)(setq pad (+ count 1000)) (setq newlayer (strcat "mylayer" (itoa pad))) (command "layer" "make" newlayer "" "" "" "" "") (setq count (1+ count)))
I think there's an error there somewhere - but lisp really isn't my forte.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
There are loads of them on the online CAD magazines.
need to create about 500 layers and I'd rather not do it manually.<BR>They need to have a specific name with a unique sequencial number in<BR>the name.&nbsp; Also, the colors need to alternate between about 4 colors.<BR>Is there such a free lisp tool or one that I can buy?&nbsp; TIA.</BLOCKQUOTE></BODY></HTML>
------=
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Thu, 8 Feb 2007 01:35:26 -0000, "Mason" <AT THE NEWS GROUP
I spent 2 hours today looking for them. I found none. You mind telling me where you know the where abouts?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

2 hours! I don't know about 'loads of them' but a two-minute search over at cadalyst.com pulled up this description:
;;;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.
Haven't tried it but it sounds like it could do what you want.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Strawberry,
I downloaded ACHLAYERS.LSP and I can't wait to try it out! If I can create the layers in Xcel and bring them into Autocad, that would be perfect!! Thank you!!!!!!!!!!!!!!!!!!!!!!!!!
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
1. Add the contents of the ARCHLAYER.LSP into your acad2006.lsp file. 2. 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 | 3. 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. 4. 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 5. 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). 6. 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
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

give me ur email and i'll try to send you an lsp that i modify. it creates 500 layers with 4 colors but the colors changes alternately only at every 125 layers
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

snipped-for-privacy@yahoo.com
Thanx!
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.