API Reference > Classes > Database Classes > OdBmDatabase Class > OdBmDatabase Methods > OdBmDatabase::addElement Method
OdBmDatabase::addElement Method
Syntax
C++
OdBmObjectId addElement(const OdBmElementPtr& pObj);
Parameters 
Description 
const OdBmElementPtr& pObj 
[in] A smart pointer to the created object that should be added to the database.  

If the element was successfully added to the database, the method returns the identifier of the created element; otherwise it returns a null identifier.

Adds a new element and registers it in the database.

Please note that a null identifier has a value, which is not equal to zero (OdBmObjectId::kNull).

Copyright (c) 2002-2021. Open Design Alliance. All rights reserved.