C++
AcDbDatabase* databaseToUse() const;
Description
This method returns a pointer to a AcDbDatabase object that can be used with this AcDbObject. If the AcDbObject is in an AcDbDatabase, then a pointer to the AcDbDatabase returned by the object's database() method will be returned, otherwise, if the AcDbObject has a non-nullptr intendedDatabase, then a pointer to that AcDbDatabase will be returned, otherwise a pointer to the current AcDbHostApplicationServices'workingDatabase will be returned.