edmiRemoteEmptyContainerBN

EdmiError edmiRemoteEmptyContainerBN(SdaiServerContext serverContextId,
                                       SdaiModel         modelId,
                                       SdaiString        containerName,
                                       SdaiInvocationId *edmiInvocationId);


Removes all instances from an instance container identified by its name and the modelId. The removed instances will not be removed from the model. This function may not be used unless the container was assigned a name when it was created.

Arguments


TypeNameComment
 

serverContextId

Context identification, from edmiDefineServerContext

 

modelId

The modelId that uniquely identifies the edmModel in the remote EDMdatabase

 

containerName

The name that was assigned to the instance container when it was created.

 

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


  

OptionComment
Option nameComment

 

Example


 

 EdmiError rstat;
 SdaiModel modelId;
 SdaiContainer contId;
 SdaiServerContext myContext;
 SdaiQueryResult queryResult;
 SdaiInteger index = 0, nHits = 10000;
 . . .
 /* Define Remote Server Context */
 rstat = edmiDefineServerContext("MyRemoteServerContext",
 "Johnny", "Supervisor", "cf37ftr", 
 "TCP", "9090", "MyServerHost", 
 NULL, NULL, NULL, NULL, NULL, &myContext); 
  
 /* Create a lock container */
 rstat = edmiRemoteCreateInstanceContainer(myContext,
 modelId, LOCK_CONTAINER, "FLOOR01", 
 "Check out of first floor", &contId, NULL); 
  
 /* Select instances to lock */
 rstat = edmiRemoteSelectInstances(myContext,
 "DataRepository", "GeneralHospital", 
 "CONSTRUCTION_ELEMENT", "FLOOR = 1",  
 SUBTYPES | ONLY_INSTANCE_IDS,  
 NULL, NULL, NULL, &index, &nHits, &queryResult,  
 NULL, NULL, NULL, NULL); 
  
 /* Put first floor in the container */
 rstat = edmiRemoteInstancesToContainerBN(myContext, modelId,
 NULL, "FLOOR01", 0, queryResult->instanceIds, NULL); 
 edmiFreeQueryResult(queryResult);
  
 /* Check out the container */
 rstat = edmiRemoteProtectInstance(myContext, contId,
 (PUBLIC_READ | GROUP_READ | OWNER_WRITE), NULL); 
 rstat = edmiRemoteSetContainerCheckedoutBN(myContext,
 modelId, "FLOOR01", NULL); 
  
 . . .
 /* Manipulate data here */
 . . .
  
 /* Check in the container */
 rstat = edmiRemoteUnsetContainerCheckedoutBN(myContext,
 modelId, "FLOOR01", NULL); 
 rstat = edmiRemoteProtectInstance(myContext, contId,
 (PUBLIC_READ | GROUP_WRITE | OWNER_WRITE), NULL); 
  
 /* Empty and delete the container */
 rstat = edmiRemoteEmptyContainerBN(myContext, modelId, "FLOOR01", NULL);
 rstat = edmiRemoteDeleteInstanceContainerBN(myContext, modelId,
 "FLOOR01", NULL); 
 . . .

 

See also

Filter by label

There are no items with the selected labels at this time.