thanks guys.
I've been out of town and am just getting back to this project.
I understand the code (checking for the layer and the command to create the layer).
(if (= nil (tblsearch "layer" "NC")) (command "-layer" "n" "NC" "c" "7" "") )
thing is, in some of the drawings the layer exists. in some it doesn't. in others it exists but, the entities are on layer "0" instead of "NC". the goal is to get all of the entities in every drawing on the "nc" layer.
The "if" statement seems like it would work the bestthen, right?
How could I batch process the script or lisp routine on all of the drawings in a folder? i know I can type in the location of every single file but that's time consuming)..like so:
sdi
1 filedia
0 open "C:\Program Files\ACAD2000\Drawings\neocase\DRAWING_LIBRARY\10_BASES\10PFB122435.dwg" ucsicon n
-layer c
7 neocase s neocase
change all
P LA nc
regenall ze qsave close
(there are some extra viewing things in there)
I'd hate to have to do this for every one...any ideas?
thank you again,
Chris