
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to get same code that will explode dimensions, hatches, etc, then delete leftover hatches that cannot not exploded, send the wipeouts to back & then change colour & layer of everything. I need this done in all drawing, in BOTH modelspace and paperspace across multiple layouts. I tried something like:
(if (setq ss (ssget "_X" '((0 . "DIMENSION,LEADER,MTEXT,HATCH"))))
(repeat (setq i (sslength ss))
(setq ename (ssname ss (setq i (1- i))))
(command "_.explode" ename)
)
)
(if (setq ss (ssget "_X" '((0 . "HATCH"))))
(repeat (setq i (sslength ss))
(setq ename (ssname ss (setq i (1- i))))
(command "_.erase" ename "")
)
)
(if (setq ss (ssget "_X" '((0 . "WIPEOUT"))))
(command "_.draworder" ss "" "")
)
(if (setq ss (ssget "_X"))
(command "_.chprop" ss "" "_layer" "0" "_c" "7" "")
)
but I keep getting the error: "1 was not in current space". Can anyone help?
Solved! Go to Solution.