API Reference > OdDAI Namespace > Classes > Model Class > Model Methods > createEntityInstance Method > Model::createEntityInstance Method (OdDAI::Entity *)
Model::createEntityInstance Method (OdDAI::Entity *)
Syntax
C++
ApplicationInstancePtr createEntityInstance(const OdDAI::Entity * entityDef);
Parameters 
Description 
const OdDAI::Entity * entityDef 
[in] A raw pointer to the entity definition that contains the type name of the new entity to be created.  

A smart pointer to the created entity instance.

Creates a new instance of a specified entity type.

If the current schema does not support the specified type, the method returns a NULL smart pointer. In this case, the isNull() method of the smart pointer object returns true. The created entity is not attached to the model.

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