edmiActivateModel
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
Type | Name | Comment |
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 | The <options> value can be specified as a bitwise OR between the actual options. 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. |
Return Value
Options
Option | Comment |
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. |
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; } . . .
See also
Filter by label
There are no items with the selected labels at this time.