v2.47
IEntityCollection Interface Reference

Represents a base Renga entity collection. More...

Public Member Functions

HRESULT Clear ()
 Removes all entities currently present in the collection.
HRESULT Contains ([in] int id, [out, retval] VARIANT_BOOL *pContains)
 Indicates whether the collection contains the entity.
HRESULT ContainsUniqueId ([in] GUID id, [out, retval] VARIANT_BOOL *pContains)
 Same as Contains, but accepting entity unique id.
HRESULT ContainsUniqueIdS ([in] BSTR id, [out, retval] VARIANT_BOOL *pContains)
 Same as ContainsUniqueId, but accepting entity unique id as a string.
HRESULT Create ([in] INewEntityArgs *pArgs, [out, retval] IEntity **ppEntity)
 Creates new entity.
HRESULT CreateNewEntityArgs ([out, retval] INewEntityArgs **ppArgs)
 Creates arguments to add new entity.
HRESULT GetById ([in] int id, [out, retval] IEntity **ppEntity)
 Gets an entity by its identifier.
HRESULT GetByIndex ([in] int index, [out, retval] IEntity **ppEntity)
 Gets the entity by the given index.
HRESULT GetByUniqueId ([in] GUID id, [out, retval] IEntity **ppEntity)
 Gets the entity by its unique identifier.
HRESULT GetByUniqueIdS ([in] BSTR id, [out, retval] IEntity **ppEntity)
 Same as GetByUniqueId, but accepting unique identifier as a string.
HRESULT GetIds ([out, retval] SAFEARRAY(int) *pIds)
 Gets entity identifiers.
HRESULT GetUniqueIds ([out, retval] IGuidCollection **ppUniqueIds)
 Gets entity unique identifiers.
HRESULT Remove ([in] int id)
 Removes entity from the collection by its identifier.
HRESULT RemoveByUniqueId ([in] GUID id)
 Removes entity from the collection by its unique identifier.
HRESULT RemoveByUniqueIdS ([in] BSTR id)
 Same as RemoveByUniqueId, but accepting entity unique id as a string.

Properties

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

Detailed Description

Represents a base Renga entity collection.

See also
IEntity, IProject

Member Function Documentation

◆ Clear()

HRESULT Clear ( )

Removes all entities currently present in the collection.

Warning
If any project entity is referencing the entity being removed, calling this method may result in program termination.

◆ Create()

HRESULT Create ( [in] INewEntityArgs * pArgs,
[out, retval] IEntity ** ppEntity )

Creates new entity.

List of entity types that can be created:

Returns
The created entity instance.
Note
When creating ElementStyle, the path to a 3D model file must be specified via NewEntityArgs.FilePath. If the specified path points to an unsupported format or the 3D model fails to load, the style will still be created, but with a default model.

◆ CreateNewEntityArgs()

HRESULT CreateNewEntityArgs ( [out, retval] INewEntityArgs ** ppArgs)

Creates arguments to add new entity.

See also
INewEntityArgs

◆ Remove()

HRESULT Remove ( [in] int id)

Removes entity from the collection by its identifier.

Parameters
[in]idEntity identifier.
Warning
If any project entity is referencing the entity being removed, calling this method may result in program termination.
See also
RemoveByUniqueId

◆ RemoveByUniqueId()

HRESULT RemoveByUniqueId ( [in] GUID id)

Removes entity from the collection by its unique identifier.

Parameters
[in]idEntity unique identifier.
Warning
If any project entity is referencing the entity being removed, calling this method may result in program termination.
See also
Remove
RemoveByUniqueIdS

◆ RemoveByUniqueIdS()

HRESULT RemoveByUniqueIdS ( [in] BSTR id)

Same as RemoveByUniqueId, but accepting entity unique id as a string.

Parameters
[in]idEntity unique identifier as string.
Warning
If any project entity is referencing the entity being removed, calling this method may result in program termination.
See also
RemoveByUniqueId