@Anonymous - nothing to do wit guess.
Thats the way how to..
Start your Acad and start the command. Command LAYER in Scripts are translate to the commandline-version -LAYER,
in could use LAYER for your script, but i use the commandlineversion call which i use to test it by Hand, type in:
-LAYER
then hit [Enter]
write down on paper:
-LAYER[enter]
Acad asking for an Option, try color and type in:
COLOR
then hit [Enter]
write down on paper:
COLOR[enter]
for example color 6:
Acad asking for a color:
6
then hit [Enter]
write down on paper:
6[enter]
Acad asking for Layer(s) to apply the color 6, for our example we use Layer"0"
0
then hit [Enter]
write down on paper:
0[enter]
Acad asking for an Option, we only want to exit the command an like the LINE command and hundred commands more, we answer without an option and hit only Enter:
hit [Enter]
write down on paper:
[enter]
Now you wrote down:
-LAYER[enter]COLOR[enter]6[enter]0[enter][enter]
Now you can create a Script, because NOW you know how the command/workflow works. Change [enter] to an <newline> in your Script:
#####################
-LAYER
COLOR
6
0
#####################
Or if you want to create a Menumacro, change [enter] to ";"
-LAYER[enter]COLOR[enter]6[enter]0[enter][enter]
-LAYER;COLOR;6;0;;
Or if you want to controle the commandline from Lisp-command, set all inputs in ""
(command "-LAYER" "COLOR" "6" "0" "" "")
---------------------
In yout Textwindow [F2]
Command: -LAYER<<enter>>
Current layer: "0"
Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/TRansparency/MATerial/Plot/Freeze/Thaw/LOck/Unlock/stAte/Description/rEconcile]: COLOR<<enter>>
New color [Truecolor/COlorbook] : 6<<enter>>
Enter name list of layer(s) for color 6 (magenta) <0>: 0<<enter>>
Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/TRansparency/MATerial/Plot/Freeze/Thaw/LOck/Unlock/stAte/Description/rEconcile]:<<enter>>
Command: