v2.44
 
IModelObjectCollection Interface Reference

Represents a model object collection. Using this interface you can obtain model objects. This interface can be obtained through IModel::GetObjects. More...

Public Member Functions

HRESULT GetById ([in] int id, [out, retval] IModelObject **ppModelObject)
 Gets an object by its identifier.
 
HRESULT GetByIndex ([in] int index, [out, retval] IModelObject **ppModelObject)
 Gets an object by the given index.
 
HRESULT GetByUniqueId ([in] GUID id, [out, retval] IModelObject **ppEntity)
 Gets an object by its unique identifier.
 
HRESULT GetIds ([out, retval] SAFEARRAY(int) *pIds)
 Gets the identifiers of objects in the collection.
 

Properties

int Count [get]
 The number of objects in the collection.
 

Detailed Description

Represents a model object collection. Using this interface you can obtain model objects. This interface can be obtained through IModel::GetObjects.

Note
IModelObjectCollection represents an immutable snapshot ot the model`s state at the time it was obtained. Any subsequent changes to the model (such as creating or deleting objects) will not affect the collection that has already been obtained. To get an updated model state, you must re-obtain the collection.
See also
IModel::GetObjects

Member Function Documentation

◆ GetById()

HRESULT GetById ( [in] int id,
[out, retval] IModelObject ** ppModelObject )

Gets an object by its identifier.

Returns
The object.

◆ GetByIndex()

HRESULT GetByIndex ( [in] int index,
[out, retval] IModelObject ** ppModelObject )

Gets an object by the given index.

Returns
The object.

◆ GetByUniqueId()

HRESULT GetByUniqueId ( [in] GUID id,
[out, retval] IModelObject ** ppEntity )

Gets an object by its unique identifier.

Returns
The object.

◆ GetIds()

HRESULT GetIds ( [out, retval] SAFEARRAY(int) * pIds)

Gets the identifiers of objects in the collection.

Returns
An array containing the identifiers of objects in the collection.