Here's my contribution, following the simpler "command" syntax:
Code:
(defun c:c2l () ;command routine "c2l" for "copy to layer"
(setq origlayer (getvar "clayer"));;stores current layer
(setq DefLayer "DefLayerName");;stores layer name in variable
;;change "DefLayerName" to layer name you want
(command "layer" "m" DefLayer "")
;;creates layer if not already present and sets it current
(setvar "clayer" origlayer);;set original layer current
(command "copy" pause "" "0,0" "0,0" "chprop" "l" "" "layer" DefLayer "")
;;copies object over itself, changes to default layer
(princ);;quiet exit
)
Bookmarks