Hello,
I am in need of a Lisp that will convert selected objects from the layer they are on to a different layer.
The following is what I am thinking.
1) create the selection set (as was provided to me yesterday by "hmsilva" (THANK YOU))
(defun c:demo ( / ss)
(if (setq ss (ssget "_:L" '((8 . "E-CAB-BORE-NP,E-CAB-PART-NP,E-CAB-POCKET-NP"))))
(command "_.move" ss "" "\\" "\\")
)
(princ)
)
But now that I have moved these objects I need to convert them to the layers that our machines can use.
E-CAB-BORE-NP TO BORE
E-CAB-PART-NP TO SHAPE
E-CAB-POCKET-NP TO POCKET_T{14STRT}
Thank you again in advance.
Also, I am open to other suggestions on how to complete this task with as few steps as possible.See attached dwg for full process.
Have a great day.
Michael
Solved! Go to Solution.
Solved by mviscetto. Go to Solution.
Thank you for the tip to use LAYMRG.
And after reading some other threads on this I discovered what I needed to compile.
This is what I came up with.
Thanks again
Michael
;;script to use layer merge for Cabinet layers – LC for Layer Change
(defun c:lc ()
(Command "_laymrg" "t" "e-cab-bore-np" "" "t" "bore" "y")
(Command "_laymrg" "t" "e-cab-part-np" "" "t" "shape" "y")
(Command "_laymrg" "t" "e-cab-pocket-np" "" "t" "POCKET_T{14STRT}" "y")
(Command "_laymrg" "t" "e-drawer-bore-np" "" "t" "bore" "y")
(Command "_laymrg" "t" "e-drawer-part-np" "" "t" "shape" "y")
(Command "_laymrg" "t" "e-drawer-pocket-np" "" "t" "POCKET_T{14STRT}" "y")
)