sdaiGetInstanceModel
Returns a numeric modelID that uniquely identifies the model in EDMdatabase that holds the specified instance.
Header:
#include "sdai.h"
Prototype:
SdaiModel sdaiGetInstanceModel(SdaiInstance instance);
Arguments:
instance |
A numeric instanceID that uniquely identifies the instance of interest in the EDMdatabase. |
Returns:
A numeric modelID that uniquely identifies the model in the EDMdatabase that holds the actual instance.
modelID != 0 : operation successfully performed.
modelID = 0 : operation failed, use sdaiErrorQuery function to get error reason.
Example:
SdaiModel model;
SdaiString name;
SdaiAppInstance aPoint;
...
model = sdaiGetInstanceModel(aPoint);
if (! model) {
/* Error in operation */
printf("\nError: %s in sdaiGetInstanceModel \n",
edmiGetErrorText(sdaiErrorQuery()));
goto error;
}
sdaiGetAttrBN(model, "Name", sdaiSTRING, &name);
if (name != NULL) {
printf("\nModel name: %s",name);
edmiFree(name);
}
. . .