C++
ACDBCORE2D_PORT ADESK_SEALED_VIRTUAL Acad::ErrorStatus explode( AcDbVoidPtrArray& entitySet ) const;
Description
This function is primarily intended for AutoCAD to call as part of an explode operation that includes this entity. However, this function can be used by ObjectARX applications to obtain an array of pointers to non-database-resident entity objects that are what the entity considers to be its exploded parts.
When calling this function, the entitySet array does not need to be empty. This function will append to it, and pointers to entities that it creates to be used in its place as the "exploded" result.
If this function is successful, it will return Acad::eOk. Other return values may vary depending on how it has been implemented.
This function should dynamically create (using the new operator) whatever entity objects are appropriate to be used to replace the entity after an explode operation has taken place. Pointers to these entities are then appended to the entitySet array. Once the pointers have been appended, the function should return with a status of Acad::eOk.
This function must not add the new entities to the database, nor should it erase the entity it is a part of. Both of these steps will be taken care of by AutoCAD (or whatever other application calls this function).
This also means that if an ObjectARX application calls the explode method of an object, the calling application is responsible for the resulting entities (that is, either appending them to a database or deleting them when they are no longer needed) and for erasing the original entity (if appropriate).
Immediately returns Acad::eNotApplicable.
When using a custom entity, you must define an explode method in order for the AutoCAD commands BHATCH and EXPLODE to work. Your explode method should break your entity down into less complicated entities.
Parameters
Parameters | Description |
---|---|
entitySet | Input array to contain pointers to new entities; this array may already contain pointers from other entities' explode() methods; output with all entities that result from exploding this entity, appended to the array |