AutoCAD/Make a Layer using a Command
Expert: Scott Wilcox - 10/25/2011
QuestionHi Scott
You gave me the following Macro a little while ago:
^C^C(setvar "clayer" "layername")
It works very well, however what if I am working in a file that has not had the layer developed. Is there a Macro that will make the layer with the properties I want?
AnswerI typically put that info in a script, which is a text file with a .SCR extension. Here is an excerpt from a script file that creates layers:
-LAYER
N ASB_PNTDES C 7 ASB_PNTDES
N ASB_PNTELV C 7 ASB_PNTELV
N ASB_PNTNO C 7 ASB_PNTNO
N ASB_POINTS C 7 ASB_POINTS
N BORDERPLINE C 21 BORDERPLINE LT DASHED BORDERPLINE
N makes a new layer, then the layer name, c for color, then the color value, then repeat the layer name, then LT if you want to assign a linetype, then a line type, then the layer name once more.
Save your script file somewhere in the support file search path with a .SCR extension, ie LAYERS.SCR
Then add the following to each macro you have already made:
^C^C(command "filedia" 0);(command "script");layers.scr;(command "filedia" 1 )
Let me know if you have any further questions.
Scott Wilcox