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 Current »


 
Returns the numeric repositoryID that uniquely identifies the repository in the EDMdatabase that contains the specified model.
Related functions: edmiMoveModel , edmiMoveModelBN
Header:
#include "sdai.h"
Prototype:
EdmiError edmiGetModelRepository(SdaiModel       model,
                                  SdaiRepository *repository); 
Arguments:

model

A numeric modelID that uniquely identifies the model of interest in the EDMdatabase.
The modelID is returned from the functions: sdaiCreateModel , sdaiCreateModelBN , sdaiOpenModelBN , edmiGetModel , edmiGetModelBN , sdaiGetInstanceModel

repository

Address of the variable that will receive the numeric repositoryID that uniquely identifies the repository in the EDMdatabase that contains the specified model.

Returns:
A completion code of datatype EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an EDMinterface error code. Use edmiGetErrorText to get the error text corresponding to the error code.
EXAMPLE
SdaiModel model;
SdaiRepository repository;
EdmiError rstat;
. . .
if (rstat = edmiGetModelRepository (model, &repository)) {
/* Error in operation */ 
printf("\nError: %s in edmiGetModelRepository\n", 
edmiGetErrorText(rstat)); 
goto error; 
}
printf ("\nModel: %lu is located in repository: %lu", model, repository);
. . .

  • No labels