Hi everyone,
I need help getting this code to work. I'm looking for the code to create a new layer with a given name, color, and layer description, then move all the items on a given layer to this new layer.
(defun c:move_from_defpoints ()
(setq ssl0 (ssget "x" '((8 . "Defpoints"))))
(if (not ssl0)
(progn
(princ "\nNo objects found on Defpoints layer.")
(exit)
)
(progn
(setq layername "fromDefpoints")
(if (tblsearch "LAYER" layername)
(command "_-LAYDEL" layername "")
)
(command "_-LAYER" "N" layername "C" "200" "" "Items moved from the Defpoints layer" "")
(command "_.CHPROP" ssl0 "" "LA" layername "")
(princ (strcat "\nObjects moved to layer: " layername))
)
)
(princ)
)
I was able to get the code to make the new layer with the name only but it will not make the layer color or the layer description that I want and it changes the current layer color to the color that I want the new layer to be.
Thanks,
Cadd4la