@Kyle.Pederson wrote:
....So I Have a Layer Called "Dimensions" with a Color of 144. So my code should look like:
(command "_.layer" "_make" "Dimensions" "_color" 144 "" "");; <---EDIT Layer name/color as desired
That doesn't seem to work either.....
What are the "" "" at the end of the code doing?
It works for me, used in isolation. Something else must be going on....
In AutoLisp code, "" [an empty text string, i.e. two double-quotes with nothing between them] is used for Enter. This is duplicating a command-line Layer command, using Enter to accept default values as you would from the keyboard. The first one is assigning the specified color to the offered-default current Layer, and the second one is ending the Layer command. The Make option in the Layer command creates the Layer if it doesn't exist [and is not bothered at all if it does already] and sets it current in the process [as opposed to the New option, which does not], so by the time the color assignment comes along, it's the default offered for the Layer to which to give that color, which means you don't need to spell out the Layer name again for that assignment.
If you can be certain that the Layer will always already exist, you can just use the "_set" option, and forget the color assignment:
(command "_.layer" "_set" "Dimensions" "")
But I always use Make for such things, so I don't have to care whether the Layer in question exists, or maybe did once but has been Purged.
[The semicolons and what follows at the end are just commentary -- everything from any semicolon onward is ignored, so you can dump that part.]
Kent Cooper, AIA