v2.26
IModel Interface Reference

Allows to obtain and edit model objects. More...

Inheritance diagram for IModel:

Public Member Functions

HRESULT GetObjects ([out, retval] IModelObjectCollection **ppModelObjectCollection)
 Returns a collection of all objects present in the model. More...
 
HRESULT CreateOperation ([out, retval] IOperation **ppOperation)
 Creates an operation. More...
 
HRESULT GetIdFromUniqueId ([in] GUID uniqueId_, [out, retval] int *id_)
 Returns the local identifier of the object of this model by it's unique identifier.
 
HRESULT GetIdFromUniqueIdS ([in] BSTR uniqueId_, [out, retval] int *id_)
 Same as GetIdFromUniqueId, but accepting GUID as a string.
 
HRESULT GetUniqueIdFromId ([in] int id_, [out, retval] GUID *uniqueId_)
 Returns the unique identifier of the object of this model by it's local identifier.
 
HRESULT GetUniqueIdFromIdS ([in] int id_, [out, retval] BSTR *uniqueId_)
 Same as GetUniqueIdFromId, but returning GUID as a string.
 

Detailed Description

Allows to obtain and edit model objects.

This interface can be obtained with IProject::Model (building model) property or from IEntity using QueryInterface (if IEntity is an assembly).

Member Function Documentation

◆ CreateOperation()

HRESULT IModel::CreateOperation ( [out, retval] IOperation **  ppOperation)

Creates an operation.

To modify any model object you need to create an operation and start it before the modifications are done, and apply it afterwards.

Deprecated:
This method is deprecated, use IProject::CreateOperation instead
Returns
The newly created operation.

◆ GetObjects()

HRESULT IModel::GetObjects ( [out, retval] IModelObjectCollection **  ppModelObjectCollection)

Returns a collection of all objects present in the model.

Returns
Collection of model objects.