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 »


 
Temporarely disengages a model from the EDMdatabase.
There is 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 temporarely archived, thereby releasing capacity in the EDMdatabase. Models that are rarely used need not be permanently active in the EDMdatabase.
This function may also be used to make multiple versions of a model. For an EDMuser to archive a model, he needs at least read access to it.
Model administration data such as ownership and protection will be archived as well.
Related functions: edmiActivateModel
Header:
#include "sdai.h"
Prototype:
EdmiError edmiArchiveModel(SdaiRepository    repository,
                            SdaiString        modelName,
                            SdaiString        archivedModelName,
                            SdaiUnsignedInt   options,
                            SdaiArchivedModel *archiveModelId);
Arguments:

Repository

A unique instance Id that identifies the data repository that contains the model to archive.

ModelName

The name of the model to archive. Model names are case sensitive.

ArchivedModelName

The name to assign to the archived model. Model names are case sensitive. The archived model name must be unique. I.e, the name must not conflict with any currently archived model.

Options

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

*archiveModelId

Address of a variable that will receive the archiveModelID that uniquely identifies the archived model.The archiveModelID is an instance of the entity express_data_manager.edm_archived_model. Use this id to set or inquire administrative data for the archived model. Such data could for instance be protection or ownership.

Option Description

KEEP_ACTIVE_MODEL

The model will be archived but remains in the EDMdatabase. Hence, using this option will not release capacity in the EDMdatabase.

SKIP_STEP_ID_MODEL

Models that are imported with the KEEP_STEP_IDENTIFIERS option will have its step Id info stored in a separate accompanying model. By default, step Id models are archived together with the data models. Use this option to prevent archiving of the step Id 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
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; 
}
. . .

  • No labels