edmiCheckForUserAccessibleInstance

EdmiError edmiCheckForUserAccessibleInstance (SdaiInstance currInst,
                                               SdaiInstance *entityId);


Checks whether an instance Id is non-existant, unavailable or reserved for the system. Some features in EDM, such as for instance check-in/check-out, create a need for storing some internal administration data within the model itself. Such instances are handled entirely by EDM and may not be modified directly by users. This function returns an sdai error code if the instance is of such an inaccessible type. The function will return an sdai error code if the instance belongs to a model that is not open for read access. A non-existent instance will of course also be user-unavailable. If the instance Id is user-accessible, the parameter entityId will receive the instance type.

Arguments


TypeNameComment
SdaiInstance

CurrInst

A numeric instanceID that uniquely identifies an instance in the EDMdatabase

SdaiInstance

EntityId

A numeric entityID that uniquely identifies the entity definition instance of interest in the EDMdatabase.

Return Value


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

 

Options


  

 

Example


 

EdmiError rstat;
 SdaiEntity entityId;
 SdaiInstance instanceId;
 . . .
 if (rstat = edmiCheckForUserAccessibleInstance(instanceId, &entityId)) {
 switch(rstat) { 
 case sdaiEMODELUNDEFACCESS: printf("\nModel not open!");
 break; 
 case sdaiENOINSTANCE: printf("\nNot user accessible!");
 break; 
 default: printf("\nError: %s\n", edmiGetErrorText(rstat));
 goto error;
 } 
 } else {
 printf("\nInstance %d is user accessible.", instanceId);
 printf("\nThe instance is of type.", entityId);
 }

 

See also

Filter by label

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