API Reference > Classes > PRC Base Data Types Classes > OdPrcObjectId Class > OdPrcObjectId Methods > openObject Method > OdPrcObjectId::openObject Method (OdPrcObjectPtr&, OpenMode, bool)
OdPrcObjectId::openObject Method (OdPrcObjectPtr&, OpenMode, bool)
Syntax
C++
OdResult openObject(OdPrcObjectPtr& pObj, OpenMode openMode = kForRead, bool openErasedOne = false) const;
Parameters 
Description 
OdPrcObjectPtr& pObj 
[out] Smart pointer that must be used for returning the opened object.  
OpenMode openMode = kForRead 
[in] Mode in which the object must be opened.  
bool openErasedOne = false 
[in] Specifies whether erased objects are also opened (true) or not (false).
 

Returns eOk if object was successfully opened, or an appropriate error code in the other case.

Opens the database object associated with the identifier. 

 

openMode must be one of the following:

Identifier 
Value 
Description 
kNotOpen 
-1 
Object is open for reading. 
kForRead 
Object is open for reading. 
kForWrite 
Object is open for reading and/or writing. 
kForNotify 
Object is open for notifying. 
Copyright (c) 2002-2020. Open Design Alliance. All rights reserved.