@agedzevicius wrote:
.... by using below will work for all layers.
(Learning process for me to understand that " is treated as list.)
Below works for what i need, how would i go about turning this into a loadable script? ....
-LAYER
C
220
"*CA(*"
[enter]
[enter]
Something is off here. In a Script, at least, you should not need those double-quotes, which define the bounds of a text string, not of a list. If you were doing this in an AutoLisp function where list is an appropriate term [but would not be used here], yes, those quotes would be needed, but they should not be in a Script or a command macro.
You can turn it into a "loadable script" in different ways, depending again on what you mean by the word. If you really mean SCRIPT in AutoCAD's usage, put that text [it should work without the quotes], with a blank line in place of the first [enter] (the second is extraneous), into a plain-text editor such as Notepad, and save it to a file with a .scr filetype ending. Use the SCRIPT command to run it.
But I used the word "run" there. Your word "loadable" makes me wonder. "Load" is something one does with AutoLisp routines. That could be like this:
(defun C:YourCommandName ()
(command "_.layer" "_color" 220 "*CA(*" "")
(prin1)
)
Save that [with a command name that means something to you substituted], similarly in a plain-text editor, to a file with a .lsp filetype ending, and use APPLOAD to Load it, then type in the YourCommandName to use it.
You could also do it in a command macro built into a Tool Palette button, such as [untested]:
^C^C_.-LAYER _color 220 *CA(* ;
Kent Cooper, AIA