sdaiGetEntityExtent
Returns a numeric aggregateID that uniquely identifies the aggregate that holds all instances of one particular type in a model. This aggregate is connected to the attribute named instances in an entity extent instance belonging to a specified model in the EDMdatabase. There is one entity extent instance for each possible instance type in a model. The possible instance types in a model are all the entity definition instances in the related dictionary model that are not defined as abstract entity.
The actual aggregate connected to the instances attribute of an entity extent instance contains all instances of one particular instance type in one model. The attribute named definition in an entity extent instance defines the instance type of the instances the actual aggregate holds.
The actual model must be open before this operation can be successfully performed.
Related function: sdaiGetEntityExtentBN
Header:
#include "sdai.h"
Prototype:
SdaiAggr sdaiGetEntityExtent(SdaiModel model,
SdaiEntity entity);
Arguments:
model |
A numeric modelID that uniquely identifies a model in the EDMdatabase. |
entity |
A numeric entityID that uniquely identifies an entity definition instance in the EDMdatabase. This argument specifies the instance type to get the entity extent of. |
Returns:
A numeric aggregateID that uniquely identifies the aggregate that contains all instances of the specified type in the actual model.
aggregateID != 0 : operation successfully performed.
aggregateID = 0 : operation failed, use sdaiErrorQuery function to get error reason.
Example:
SdaiEntity pointId;
SdaiModel model;
SdaiAggr instancesId;
...
instancesId = sdaiGetEntityExtent(model, pointId);
if (! instancesId) {
/* Error in operation */
printf("\nError: %s in sdaiGetEntityExtent \n",
edmiGetErrorText(sdaiErrorQuery()));
goto error;
}
printf("\nNumber of Point instances in model: %ld",
sdaiGetMemberCount(instancesId));
. . .