For your first part, direct the object to the target layer
after creation instead of
setting the environment, then adding the object, then restoring the environment.
You have to remember that *Cancel* will disrupt everything...
Maybe create subroutines that can help you with this chore:
(defun DIRECTTOLAYER-L ( a / )
(command ".CHPROP" "L" "" "Layer" a "")
(princ)
);end
(defun DIRECTTOLAYER-P ( a / )
(command ".CHPROP" "P" "" "Layer" a "")
(princ)
);end
Place the above in your acaddoc or acad or MNL file and you are ready to go...
At the end of your macro just add the following:
^C^C_ai_molc \-insert CASING \1;;\(DIRECTTOLAYER-L "MyNewLayer")
Where "My New Layer" is the target layer name...
Keep Going!
Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.