C++
Acad::ErrorStatus setIntendedDatabase( AcDbDatabase* pDb );
Description
This method allows setting an intended AcDbDatabase for this AcDbObject as long as this AcDbObject is not yet in an AcDbDatabase.
When this AcDbObject is added to an AcDbDatabase, the intendedDatabase will automatically become nullptr and this method will not allow setting to anything else.
The intended AcDbDatabase is the AcDbDatabase that this object is expected to be added to or associated with (such as if this AcDbObject is embedded in another AcDbObject that is in an AcDbDatabase).
For AcDbEntity objects not yet in an AcDbDatabase, the intended AcDbDatabase is automatically set when their layer, linetype, or material is set.
Custom object implementations should set the intended database whenever any custom database specific property (i.e. associated with an AcDbObjectId) on their object is set.
Parameters
Parameters | Description |
---|---|
pDb | Input pointer to desired intended AcDbDatabase |
Returns
Returns Acad::eOk if successful or Acad::eInvalidContext if this AcDbObject is already in an AcDbDatabase and pDb != nullptr.