EXPLODE Error Message

EXPLODE Error Message

Kyudos
Advisor Advisor
413 Views
2 Replies
Message 1 of 3

EXPLODE Error Message

Kyudos
Advisor
Advisor

I have a custom object that is, essentially, a linked collection of some of my other custom objects. In the explode function for the 'parent' object I remove the links between the objects allowing them to behave independently.

 

However since this does not involve creating or deleting any objects I'm returning eNotApplicable - this prevents explode from deleting the original object.

Unfortunately it also causes AutoCAD to report "Cannot explode YourCustomEntity". Since the desired action has actually been completed, this could be a bit confusing.

 

Is there any way to return from the explode function that prevents the 'normal' function of explode, but also prevents the "Cannot explode..." message?

0 Likes
414 Views
2 Replies
Replies (2)
Message 2 of 3

BerndCuder8196
Advocate
Advocate
First, I think an custom object (derived from AcDbObject) have no explode method.
If you have derived from AcDbEntity and your explode does nothing, you must not override it, because explode from AcDbEntity does nothing. Or simply return AcDb::eOk.
0 Likes
Message 3 of 3

BerndCuder8196
Advocate
Advocate
Ok, my mistake, return eOk will erase your custom entity. But if you return eNotApplicable, the AutoCAD message is correct. I think the best way is to clone your entity in explode, returns the clone in entity list and also returns eOk.
0 Likes