edmiRemoteGetStepIdOfInstance

 EdmiError edmiRemoteGetStepIdOfInstance(SdaiServerContext serverContextId,
                                          SdaiAppInstance   currInst,
                                          SdaiInteger       *stepId,
                                          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 stepId in the ISO10303-21 STEP file that corresponds to an instanceId in the EDMdatabase

Arguments


TypeNameComment
 SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

 SdaiAppInstance

currInst

The numeric instanceId that uniquely identifies the instance in the remote  EDMdatabase

 SdaiInteger

stepId

A variable that will receive the numeric stepId that corresponds to the instanceId specified by the <currinst> argument.

 SdaiInvocationId

edmiInvocationId

Currently not used.

Return Value


Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_EDMInterface'.

 

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.