How do I change a default answer within the Layer Command?
Specifically, I am writing a Lisp to that makes our standard layers. When it makes the layer the 1st time it is run, it works fine. Any subsequent times I get a prompt when giving the layer a description that asks me if I want to replace the existing Description. The default answer is "NO". How to i surpress that promt or change the default to "YES"? I can;t answer that question in my code, because it is not asked the 1st time it is run.
Here is a sample of what I have written for each layer. I am open to suggestions (i.e. if/then) if it not too complicated. I am a novice when it comes to Lisp.
This has come up before -- I'll let you do the Searching, which I suggest you do in the "Search the Community" Search window rather than just in this Board, because the answer may be under some other version range, or in the Customization Forum.
Try to add a check, to see if the layer already exists, if it doesn't exist then create it.
(if (not (tblsearch "LAYER" "LAYERNAME"))(command "-LAYER" "N" "LAYERNAME" ""))