C++
Acad::ErrorStatus purge( AcDbObjectIdArray& ids );
Description
This function searches through the database to see if there are any hard references to objects with object ID entities in the ids array. If any such objects are found, their object ID entities are removed from the ids array. So, when this function returns, the ids array will contain only object ID entities of objects that are not currently hard-referenced and thus can safely be erased.
If the database is in a partially opened state, object ID entities of objects that were not created in the current editing session are also removed from the ids array.
This function does not modify the database in any way.
To duplicate the AutoCAD purge mechanism functionality, use this function to determine what database objects (of the type desired) can be purged or erased, and then open each such object, call its erase() method to erase it, and close it. For example, to purge all unreferenced layers, call the purge method, passing in an array containing the object ID entities of all the AcDbLayerTableRecords in the LayerTable, then erase all the objects whose object ID entities are still in the array after the purge function has returned.
Returns Acad::eOk if the operation is successful.
Parameters
Parameters | Description |
---|---|
ids | Input array of object ID entities of objects |