Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »


Returns the numeric modelID that uniquely identifies the specified model in the EDMdatabase. Related function: edmiGetModelBN .
Header:
#include "sdai.h"
Prototype:
SdaiModel edmiGetModel(SdaiRepository repository,
                        SdaiString     modelName); 
Arguments:

repository

A numeric repositoryID that uniquely identifies the repository in the EDMdatabase that holds the model of interest.
The repositoryID is returned by the following operations: edmiCreateRepository , sdaiOpenRepository , sdaiOpenRepositoryBN ,edmiGetRepository , edmiOpenRepository , and edmiOpenRepositoryBN .

modelName

Specifies the name of the model of interest. Model names are case sensitive. A model name is unique within a repository, hence the combination of the arguments <repository> and <modelName> uniquely identifies a model in an EDMdatabase.

Returns:
A numeric modelId that uniquely identifies the specified model in the EDMdatabase. The modelId can have the following values:
modelID = 0 : Error in operation. Use sdaiErrorQuery to get error code and edmiGetErrorText to get the error message.
modelID != 0: Function successfully performed.
EXAMPLE
SdaiModel modelId;
SdaiRepository repository;
. . .
modelId = edmiGetModel(repository, "AP203_Bumper");
if (! modelId) {
/* Error in operation */ 
printf("\nError: %s in edmiGetModel\n", 
edmiGetErrorText(sdaiErrorQuery())); 
goto error; 
}
/* print modelId of model */
printf("\nModelId : %lu", modelId);
. . .

  • No labels