edmiGetScratchInstances
SdaiAggr edmiGetScratchInstances(void);
Returns the instances aggregate of the model contents instance in the scratch model. The scratch model can contain instances of any available type (any entity definition) in an EDMdatabase. All scratch instances in an EDMdatabase are located in the scratch model. The instances aggregates contains all scratch instances in an EDMserver session. The scratch model belongs to an EDMserver session, hence the scratch model (and all scratch instances are not persistent in an EDMdatabase. The scratch model will be deleted when the open EDMserver session is closed and a new empty scratch model will be created when a new EDMserver session is opened. All EDMinterface read access operations that are applicable on SET aggregates are applicable to the returned aggregate.
EXPRESS:
ENTITY sdai_model_contents;Â
    instances        : SET OF entity_instance;
    folders                  : SET OF entity_extent;Â
    populated_folders : SET OF entity_extent;Â
END_ENTITY;
Arguments
Return Value
Â
Option | Comment |
---|---|
SdaiAggr | Â A numeric aggregateID of datatype SdaiAggr that uniquely identifies the created aggregate in the EDMdatabase is the returned function value. The aggregateID has the following values: aggregateID <> 0 : Operation successfully performed has return scratchInstance ID aggregateID = 0: Error in operation. Use sdaiErrorQuery to get error code and edmiGetErrorText to get the error text corresponding to the error code. |
 |  |
Options
Â
Example
Â
 SdaiAggr scratchInstancesId; SdaiErrorCode rstat; SdaiInstance id; SdaiInteger index, members; . . . scratchInstancesId = edmiGetScratchInstances(); if (! scratchInstancesId) { /* Error in operation */ printf("\nError: %s in edmiGetScratchInstances\n", edmiGetErrorText(sdaiErrorQuery())); goto error; } members = sdaiGetMemberCounts(scratchInstancesId); /* Print instanceID of all scratch instances in the session */ for (index = 0; index < members; index++) { edmiGetAggrElement(scratchInstancesId, index, sdaiINSTANCE, &id); rstat = sdaiErrorQuery(); if (rstat) { /* Error in operation */ printf("\nError: %s in edmiGetAggrElement\n", edmiGetErrorText(sdaiErrorQuery())); goto error; } printf ("\nScratchInstanceID: %lu", id); } . . .
Â
See also
Filter by label
There are no items with the selected labels at this time.
Â