IMsCalculationChainModel.EditModel

Syntax

EditModel: IMsModel;

Description

The EditModel method opens a model for edit.

Example

Executing the example requires that the repository includes a modeling container with the CONT_M identifier. The container includes a metamodel with the META_MODEL identifier.

Add links to the Metabase and Ms system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    cm: IMetabaseObjectDescriptor;
    MetaModel: IMsMetaModel;
    ChainEntries: IMsCalculationChainEntries;
    ChainModel: IMsCalculationChainModel;
    Model: IMsModel;
Begin
    mb := MetabaseClass.Active;
    cm := mb.ItemById("CONT_M");
    MetaModel := mb.ItemByIdNamespace("META_MODEL",cm.Key).Edit As IMsMetaModel;
    ChainEntries := MetaModel.CalculationChain;
    ChainModel := ChainEntries.AddExclusiveModel;
    Model := ChainModel.EditModel;
    (Model As IMetabaseObject).Name := "Internal model";
    (MetaModel As IMetabaseObject).Save;
End Sub;

After executing the example the internal model named Internal Model is added to the metamodel calculation chain.

See also:

IMsCalculationChainModel