sdaiOpenModel


Opens the specified model for the specified access mode. No access is permitted to a model before it is opened. Dictionary models can only be opened for read only.
When the actual model to open has a STEP Identifier model connected, this connected STEP Identifier model will as well be opened for read only access by this operation.
The legal access modes are:
sdaiRO : open for read only operations.
sdaiRW : open for read and write operations.
The repository that holds the actual model must be open before this function can be successfully performed.
Related function: sdaiOpenModelBN
#include "sdai.h"
Prototype:
SdaiModel sdaiOpenModel(SdaiModel      model,
                         SdaiAccessMode mode);
Arguments:

model

A numeric modelID that uniquely identifies the model in the EDMdatabase to open.
The modelID is defined by a sdaiCreateModel or sdaiCreateModelBN function.

mode

Access mode , i.e. either sdaiRO or sdaiRW.

Returns:
A numeric modelID that uniquely identifies the model in the EDMdatabase that is opened by this operation.
modelID != 0 : operation successfully performed.
modelID = 0 : operation failed, use sdaiErrorQuery function to get error reason.
Example:
SdaiModel model, openModel;
...
openModel = sdaiOpenModel (model, sdaiRW);
if (! openModel) {
/* Error in operation */ 
printf("\nError: %s in sdaiOpenModel \n", 
edmiGetErrorText(sdaiErrorQuery())); 
goto error; 
}
. . .