Explode Command & SSGET

Explode Command & SSGET

steelcitymetal
Enthusiast Enthusiast
2,217 Views
4 Replies
Message 1 of 5

Explode Command & SSGET

steelcitymetal
Enthusiast
Enthusiast

If I use:

(command "erase" (ssget) "")

all objects I select are erased.

 

However, if I change it to:

(command "explode" (ssget) "")

only the LAST object that was selected is exploded.

 

What is going on here?  Why is it not exploding all items selected?

 

Edit: The object type I am testing this on are closed polylines.

 

 

 

Obviously I plan on adding more to this, but here is the "full" code which is not exploding all selected objects (only the last object selected):

(defun c:xc()
(command "explode" (ssget) "")
)

 

0 Likes
Accepted solutions (1)
2,218 Views
4 Replies
Replies (4)
Message 2 of 5

Ranjit_Singh
Advisor
Advisor
Accepted solution

There are different command versions that can be invoked. Before calling explode set the command version to 2

(initcommandversion 2)
(command "explode" (ssget) "")
Message 3 of 5

steelcitymetal
Enthusiast
Enthusiast

That works, thanks.

 

To set it back, do I just use (initcommandversion) ?

0 Likes
Message 4 of 5

Ranjit_Singh
Advisor
Advisor

initcommandversion applies only to the command that follows. It should go back to current version right after the command ends. You shouldn't have to do anything.

0 Likes
Message 5 of 5

已半已满
Community Visitor
Community Visitor

thanks a lot , this is exactly what i am looking for. 

0 Likes