API Reference > OdDb Classes > OdDbObjectId Class > OdDbObjectId Methods > openObject Method > OdDbObjectId::openObject Method (OdDbObjectPtr&, OdDb::OpenMode, bool)
OdDbObjectId::openObject Method (OdDbObjectPtr&, OdDb::OpenMode, bool)
Syntax
C++
OdResult openObject(OdDbObjectPtr& pObj, OdDb::OpenMode openMode = OdDb::kForRead, bool openErasedOne = false) const;
Parameters 
Description 
OdDbObjectPtr& pObj 
[out] Smart pointer to opened object  
OdDb::OpenMode openMode = OdDb::kForRead 
[in] Mode in which to open the object.  
bool openErasedOne = false 
[in] If and only if true, erased objects will be opened. 

Returns eOk if successful, otherwise an Error Code. 

openMode must be one of the following: 

 

Name 
Value 
Description 
OdDb::kForRead 
Object is open for reading. 
OdDb::kForWrite 
Object is open for reading and/or writing. 
OdDb::kForNotify 
Object is open for notify. 

Opens the database object associated with this ObjectId object, in the specified mode. 

 

Copyright © 2002–2020. Open Design Alliance. All rights reserved.