Message 1 of 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all,
I need a lisp to select objects then Explode them, select previous and Copybase 0,0 and make undo before Explode.
I am trying but it only selects 1st exploded object from selection and copy that not all exploded objects.
(defun c:CopyExplodeUndo (/ ss exploded-ss)
;; Start an undo group
(command "_.UNDO" "BEGIN")
;; Ask the user to select objects
(setq ss (ssget))
;; If the user selects objects, proceed
(if ss
(progn
;; Explode the selected objects
(command "_.EXPLODE" ss)
;; Select all exploded objects
(setq exploded-ss (ssget "_P"))
;; Copy the exploded objects from base point 0,0
(command "_.COPYBASE" '(0 0) exploded-ss "")
)
)
;; Undo all actions in this group
(command "_.UNDO" "END")
(command "_.UNDO" "1")
;; End the routine
(princ)
)
Thank you.
Solved! Go to Solution.