API Reference > Other Classes > OdResBuf Class > OdResBuf Methods > OdResBuf::setObjectId Method
OdResBuf::setObjectId Method
Syntax
C++
void setObjectId(const OdDbObjectId& idObject);
Parameters 
Description 
const OdDbObjectId& idObject 
[in] Object ID instance to be set. 

Sets the data content of the ResBuf object using the specified object ID instance only if the stored group code has the ObjectId, SoftPointerId, HardPointerId, SoftOwnershipId, or HardOwnershipId type. 

 

This method generates the OdError_InvalidResBuf exception when the stored data type does not correspond to the ObjectId type. The passed value must be the OdDbObjectId instance. Only group codes kRtEntName and kDxfEnd store the object ID, other group codes store the handle.

Example of Entering and Displaying Tagged Data 

Getting and Setting Objects 

Determining the Data Type by Group Code 

OdResBuf::getEntName(), OdResBuf::setRestype(), OdDxfCode::_getType() methods 

OdDbObjectId, OdDbHandle classes

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