Hello all,
I have written a simple lisp routine for layer management. It works great, except for two areas.
1) I would like it to print a message when the "If" statement is not true. (ex. if the layer R4Roof does not exits, then print "Layer Group Does Not Exist", before the command exits.
2.) Currently, I have cmdecho set to 0, which is great if all the layers are there, or if the command exits. However; if R4Roof does exist, but any of the remaining layers in the "on" portion of the command are absent, the layer command scrolls on the command line.
I would like the command line not to echo the layer command in this instance, but I am not sure it is possible...at least, I can't seem to find a way to make it work.
In both of these cases I have tried several methods. The first, I think I am missing something simple, the second, I am not sure it is possible.
The following is the lisp as it sits currently.
(defun R4()
(setvar "cmdecho" 0)
(if (tblsearch "layer" "R4Roof")
(progn
(command "._layer"
"set" "0"
"off" "*" "No"
"on" "R4*,F4Wall,F4WallsAbv,F4WallsBel,Viewports,PS-*"
"off" ""
"set" "R4Roof"
"")
)
)
(setvar "cmdecho" 1)
(princ)
)
Any and help / suggestions are tremendously appreciated!
Thank you,
Roger
Message was edited by: RogWeb