AcDbAssocAction::removeActionsControllingObject Method   

static Acad::ErrorStatus removeActionsControllingObject(
    const AcDbObjectId& objectToRemoveActionsFrom, 
    int readOnlyDependencyHandling = 0, 
    const AcDbObjectId& objectToRedirectReadOnlyDependenciesTo = AcDbObjectId::kNull
);
Parameters
Parameters 
Description 
int readOnlyDependencyHandling = 0 
0 - Keep all read-only dependencies, let them still depend on the object, or redirect them to another object, if provided. Dependencies on intermediate (not last) object state will then depend on the last (and only) object state of the object, which may produce incorrect results in some cases.
1 - Keep read-only dependencies only if they depend on the last object state of the object, or redirect them to another object, if provided. Dependencies that depend on intermediate object states of the object are detached.
2 - Detach all dependencies on the object.
 
Returns

Acad::ErrorStatus.

Description

Detaches the write-dependencies on the object from the object and marks the dependencies with kErasedAssocStatus. It does it in the reverse order, starting from the last write dependency on the object and ending with the first. It calls removeActionsControllingObjectOverride() on the individual action bodies of the object, so that they can do their own work, instead of the default handling that just detaches the write-dependencies from the object and sets their status to kErasedAssocStatus. 

The evaluation algorithm will later evaluate the actions owning these dependencies with kErasedAssocStatus, and the evaluateOverride() method of these actions may either change or erase these actions. 

This call may create a new object, copy some contents from objectToRemoveActionsFrom to this newly created object, do swapIdWith() with objectToRemoveActionsFrom and then erase objectToRemoveActionsFrom. This is currently happening for the AcDbExtrudedRevolved/SweptLoftedSurface entities that may be this way 'converted' to a base AcDbSurface entities.

Links