edmiInstancesToContainer
EdmiError edmiInstancesToContainer(SdaiContainer sourceContainerId, SdaiContainer targetContainerId, SdaiAggr instances, SdaiAppInstance *instanceBuffer);
Adds/removes an aggregate or buffer of instances to/from an instance container identified by its containerId. This function may also move instances between containers. The behaviour is controlled by the values given in the source and target parameters <sourceContainerId> and <targetContainerId >. The table below illustrates this
source | target | Behavior |
Unset | Set | The instances will be inserted into the target container. |
Set | Unset | The instances will be removed from the source container. |
Set | Set | The instances will be moved from source to target. I.e removed from the source container and inserted into the target container. |
Arguments
Type | Name | Comment |
SdaiContainer | sourceContainerId | The containerId of the instance container from which to remove the instances given in < instanceBuffer >. By default, no instances will be removed from any container. |
SdaiContainer | targetContainerId | The containerId of the instance container in which to insert the instances given in <instanceBuffer>. By default, no instances will be inserted into any container. |
SdaiAggr | instances | An aggregate containing all the instances to move to, from or between containers. If this parameter contains an aggregateId, the parameter <instanceBuffer> will be neglected. |
SdaiAppInstance | instanceBuffer | An instance buffer containing all the instances to move to, from or between containers. |
Return Value
Options
Â
Example
Â
 #define BUFFSIZE 1000 EdmiError rstat; SdaiModel modelId = 0; SdaiInstance instBuff[BUFFSIZE]; SdaiInteger index = 0, nElem = BUFFSIZE; SdaiContainer contId = 0; . . . rstat = edmiCreateInstanceContainer(modelId, MODEL_LOCK_CONTAINER, "FLOOR01", "First Floor", &contId); rstat = edmiSelectInstancesBN(modelId, "CONSTRUCTION_ELEMENT", "FLOOR = 1", SUBTYPES, BUFFSIZE, &index, &nElem, &instBuff[0]); if (rstat = edmiInstancesToContainer(0, contId, 0, instBuff)) { printf("\nError %d in edmiInstancesToContainer: %s", rstat, edmiGetErrorText(rstat)); goto err; } . . .
Â
See also
Filter by label
There are no items with the selected labels at this time.
Â