Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

Code Block
languagecpp
themeConfluence
EdmiError edmiActivateModel(SdaiString         archivedModelName,
                              SdaiRepository   repository,
                              SdaiString       modelName,
                              SdaiUnsignedInt  options,
                              SdaiModel       *modelId);

This function activates an archived model in the EDMdatabase. There are a maximum number of models that may coexist within an EDMdatabase. Users that need to store great numbers of models may exceed this capacity. However, models may be temporarily archived, thereby releasing capacity in the EDMdatabase. Models that are rarely used need not be permanently active in the EDMdatabase.

...

For an EDM user to activate a model, he needs at least read access to it.

...

Arguments

...

TypeNameComment
SdaiString

ArchivedModelName

The name of the archived model to be activated. Model names are case sensitive.

SdaiRepository

Repository

The instance Id that identifies the repository in which to activate the model.

SdaiString

ModelName

The name to assign to the activated model. Model names are case sensitive. If this parameter is NULL or an empty string, the model will be activated under its original name.

SdaiUnsignedInt

Options

Specifies the options to be used in the invocation of the edmiActivateModel function. The  The <options> value can be specified as a bitwise OR between the actual options. All options are defined in the header file sdai.h .
See description of the available options below.

SdaiModel

*modelId

Address of a variable that will receive the modelID that uniquely identifies the activated data model.

Options: Descriptions:

Return Value

...

Insert excerpt
US:_r_EDMInterface
US:_r_EDMInterface
nopaneltrue

 

Options

...

  

OptionComment

SKIP_STEP_ID_MODEL

Models that are imported with the KEEP_STEP_IDENTIFIERS option and later archived without the SKIP_STEP_ID_MODEL will have their step Id info archived in separate accompanying models. By default, STEP Id models will be activated together with the data models. Use this option to prevent activation of these step Id models.

RESTORE_MODEL_ADMIN_DATA

Use this option to restore the models original administration data. If this option is not used, the activated model will have its administration data set as if it were created by the user by e.g edmiCreateModel.

KEEP_ARCHIVED_MODEL

The model will be activated but remains archived.

 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
EdmiError rstat;
SdaiModel modId;
SdaiArchivedModel arcModId;
SdaiString arcModName = "arcModel";
SdaiString modName = "myModel";
. . .
 
/* Activate the model */
if (rstat = edmiActivateModel(arcModName, repId, modName, 0, &modId)) {
printf("\nError %d in edmiActivateModel: %s", rstat, 
edmiGetErrorText(rstat)); 
goto error; 
}
 
/* Work on the model here */
. . .
 
/* Archive the model */
if (rstat = edmiArchiveModel(repId, modName, arcModName ,0, &arcModId)) {
printf("\nError %d in edmiArchiveModel: %s", rstat, 
edmiGetErrorText(rstat)); 
goto error; 
}
. . .

Example

...

 

Code Block
languagecpp
 EdmiError rstat;
 SdaiModel modId;
 SdaiArchivedModel arcModId;
 SdaiString arcModName = "arcModel";
 SdaiString modName = "myModel";
 . . .
  
 /* Activate the model */
 if (rstat = edmiActivateModel(arcModName, repId, modName, 0, &modId)) {
 printf("\nError %d in edmiActivateModel: %s", rstat, 
 edmiGetErrorText(rstat)); 
 goto error; 
 }
  
 /* Work on the model here */
 . . .
  
 /* Archive the model */
 if (rstat = edmiArchiveModel(repId, modName, arcModName ,0, &arcModId)) {
 printf("\nError %d in edmiArchiveModel: %s", rstat, 
 edmiGetErrorText(rstat)); 
 goto error; 
 }
 . . .

 

See also

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "model" and parent = "6062220"