edmiCreateInstanceAndPutAttrs
SdaiAppInstance edmiCreateInstanceAndPutAttrs(SdaiModel model, SdaiEntity entity, SdaiInteger numberAttr, /* [SdaiAttr attribute, SdaiPrimitiveType valueType, void attributeValue]*/ . . .); /* values */
This operation creates an entity instance and optionally set the specified attribute values of the created instance. This operation is only applicable to data models. The actual data model must be open for write access, before this operation can be successfully performed.
Arguments
Type | Name | Comment |
SdaiModel | model | A numeric modelID that uniquely identifies the model in the EDMdatabase in which the instance is created. |
SdaiEntity | entity | A numeric entityID that uniquely identifies an entity definition instance in a dictionary model in the EDMdatabase. This entity definition must be defined in the underlying schema of the actual model specified by the <model> argument. |
SdaiInteger | numberAttr | An integer number that specifies the number of attribute values to put in the operation. |
 | values | For each attribute value to assign the three following arguments in the following order have to be specified:
|
Return Value
Â
Type | Comment | Â |
SdaiAppInstance | Â | Â |
Options
 Â
Â
Example
Â
 SdaiAppInstance myPoint; SdaiEntity pointId; SdaiAttr xId, yId, zId; SdaiModel model; ... myPoint = edmiCreateInstanceAndPutAttrs(model, pointId, 3, xId, sdaiREAL, 0.0, yId, sdaiREAL, 0.0, zId, sdaiREAL, 0.0); if (! myPoint) { /* Error in operation */ printf("\nError in edmiCreateInstanceAndPutAttrs: %s\n", edmiGetErrorText(sdaiErrorQuery())); goto error; } ...
Â
See also
Filter by label
There are no items with the selected labels at this time.
Â