sdaiOpenModelBN
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: sdaiOpenModel
Header:
#include "sdai.h"
Prototype:
SdaiModel sdaiOpenModelBN(SdaiRepository repository,
SdaiString modelName,
SdaiAccessMode mode);
Arguments:
repository |
A numeric repositoryID that uniquely identifies the repository in the EDMdatabase that holds the model to open. |
modelName |
The name of the model to open. A model name is unique within a repository. Model names are case sensitive. |
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;
SdaiRepository repository;
...
model = sdaiOpenModelBN (repository, "Bumper", sdaiRO);
if (! openModel) {
/* Error in operation */
printf("\nError: %s in sdaiOpenModelBN \n",
edmiGetErrorText(sdaiErrorQuery()));
goto error;
}
. . .