Suberase does not get called

Suberase does not get called

Anonymous
Not applicable
520 Views
3 Replies
Message 1 of 4

Suberase does not get called

Anonymous
Not applicable

Hi all ,

 

I have an object derived from AcDbObject having erase and suberase api's .So sometimes what is happening this suberase is not getting called upon 'explode' command .

 

This happens only in the case whnever AcDbObject derived object contains another object on it.

 

Any reply would be welcome.

 

Thanks

Pradeep Sharma

0 Likes
521 Views
3 Replies
Replies (3)
Message 2 of 4

moogalm
Autodesk Support
Autodesk Support

 "AcDbObject derived object contains another object on it."

 

Can you please provide test sample ? To understand your query.

 

 

0 Likes
Message 3 of 4

tbrammer
Advisor
Advisor

@Anonymous wrote:

I have an object derived from AcDbObject having erase and suberase api's .So sometimes what is happening this suberase is not getting called upon 'explode' command .

 

This happens only in the case whnever AcDbObject derived object contains another object on it.


The EXPLODE command works with enties (AcDbEntity), not with AcDbObject.

It calls the virtual method  Acad::ErrorStatus AcDbEntity::explode(AcDbVoidPtrArray& entitySet) for the entity, which should be implemented to create 1..N "explosion fragments". If it succeeds the original entity is erased and replaced by the entities in entitySet.

 

Which mechanism will erase your AcDbObject? Are you sure that it is erased from the DB at all?

 


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

0 Likes
Message 4 of 4

Kyudos
Advisor
Advisor

If you have nested objects, are you exploding all of them? You may need to EXPLODE more than once...

0 Likes