edmiRemoteGetInstanceOfStepId
EdmiError edmiRemoteGetInstanceOfStepId(SdaiServerContext serverContextId, SdaiModel modelId, SdaiInteger stepId, SdaiAppInstance *currInst, SdaiInvocationId *edmiInvocationId);
The function edmiRemoteReadStepFile may optionally create a STEP identifier model. The purpose of such a model is to preserve the correlation between the ISO10303-21 STEP file instance identifiers, stepIds, and their corresponding instanceIds in the EDMdatabase If an edmModel was initially populated from a STEP file, and a STEP identifier model was created, this function will return the instanceId in the EDMdatabase that corresponds to a stepId in the ISO10303-21 STEP file.
Arguments
Type | Name | Comment |
SdaiServerContext | serverContextId | Context identification, from edmiDefineServerContext |
SdaiModel | modelId | The numeric modelID that uniquely identifies the edmModel of interest in the EDMdatabase. This is the model that was created by the edmiRemoteReadStepFile. |
SdaiInteger | stepId | The numeric identifier that uniquely identifies an entity instance within the ISO10303-21 STEP file that was imported into the edmModel. |
SdaiAppInstance | currInst | Variable that will receive the instanceId that corresponds to the given stepId. |
SdaiInvocationId | edmiInvocationId | Currently not used. |
Return Value
Â
Options
 Â
Â
Example
Â
 EdmiError rstat, error; SdaiInteger nWrn, nErr, stepId; SdaiInstance instId; SdaiServerContext myContext; SdaiModel modelId, stepModelId; /* Create Server Context */ rstat = edmiDefineServerContext("MyContext", "Johnny", "Supervisor", "cf37ftr", "TCP", "9090", "MyServerHost", NULL, NULL, NULL, NULL, NULL, &myContext); /* Read the population into the remote database */ rstat = edmiRemoteReadStepFile(myContext, "OurRemoteRepository", "OurRemoteModel", NULL, NULL, "c:/data/population.stp", NULL, "OurExpressSchema", NULL, DELETING_EXISTING_MODEL | KEEP_STEP_IDENTIFIERS, &nWrn, &nErr, &error, NULL); /* Get the modelId of the data model */ rstat = edmiRemoteGetModelBN(myContext, "OurRemoteRepository", "OurRemoteModel", &modelId, NULL); printf("Created model %s with modelId %d", "OurRemoteModel", modelId); /* Get the modelId of the step identifyer model */ rstat = edmiRemoteGetModelBN(myContext, "OurRemoteRepository", "OurRemoteModel_EDM_STEPID_", &stepModelId, NULL); printf("Created stepId model %s with modelId %d", "OurRemoteModel_EDM_STEPID_", stepModelId); /* Get the instanceId that corresponds to the ISO10303-21 StepIdentifyer #1. */ rstat = edmiRemoteGetInstanceOfStepId(myContext, modelId, 1, &instId, NULL); /* Get the ISO10303-21 StepIdentifyer that corresponds to the instance Id. That, of course, will be 1 */ rstat = edmiRemoteGetStepIdOfInstance(myContext, instId, &stepId, NULL); /* Delete instance with stepId #1 */ rstat = edmiRemoteDeleteInstance(myContext, instId, 0, NULL); /* Write the modified population back on a step physical file. The step identifyers in this file will equal to those in the input file, except that the stepId #1 will be gone. */ rstat = edmiRemoteWriteStepFile(myContext, "OurRemoteRepository", "OurRemoteModel", NULL, NULL, "c:/data/new_population.stp", NULL, NULL, KEEP_STEP_IDENTIFIERS, 6, &nWrn, &nErr, &error, NULL); . . .
Â
See also
Filter by label
There are no items with the selected labels at this time.
Â