API Reference > OdDg Classes > OdDgDatabase Class > OdDgDatabase Methods > OdDgDatabase::addOdDgElement Method
OdDgDatabase::addOdDgElement Method
Syntax
C++
OdDgElementId addOdDgElement(OdDgElement* pObject, OdDgElementId ownerId = OdDgElementId::kNull, OdDbHandle handle = 0);
Parameters 
Description 
OdDgElement* pObject 
[in] Pointer to the object.  
OdDgElementId ownerId = OdDgElementId::kNull 
[in] Object ID of the owner of pObject.  
OdDbHandle handle = 0 
[in] Handle for pObject 

Adds an object to this database object, and returns its Element ID. 

 

A unique handle will be generated if handle is not supplied or is 0.

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