![]() |
v2.44
|
|
The object can be created with IModel::CreateObject() method and INewEntityArgs interface. The INewEntityArgs interface contains a set of all the necessary arguments that may be required to create various object types. For example, to create a Column on a level, you need to set the INewEntityArgs::TypeId field equal to the column type, and the INewEntityArgs::HostObjectId equal to the level where you want to place the object. You can read more about it in the description of the INewEntityArgs interface.
Additionally, you can:
Optionally assign a style to objects that support styles by setting INewEntityArgs::StyleId.
For Equipment, MechanicalEquipment and Plumbing Fixture, specifying a style before creation is mandatory.
INewEntityArgs::FilePath.The object can be deleted with IModel::DeleteObjectById() or IModel::DeleteObjectByUniqueId() method. Note that if the object being deleted has dependent objects, they will be deleted along with it.