edmiArchiveModel


 

EdmiError edmiArchiveModel(SdaiRepository    repository,
                            SdaiString        modelName,
                            SdaiString        archivedModelName,
                            SdaiUnsignedInt   options,
                            SdaiArchivedModel *archiveModelId);

Archives a model in 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 temporarily 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.

 

Arguments


TypeNameComment
SdaiRepository

Repository

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

SdaiString

ModelName

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

SdaiString

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.

SdaiUnsignedInt

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.

SdaiArchivedModel

*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.

Return Value


Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_EDMInterface'.

 

Options


  

OptionComment

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.

 

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.