IMsCalculationChainModel.EditModel

Syntax

EditModel: IMsModel;

Description

The EditModel method opens a model for edit.

Example

Executing the example requires that the repository contains a modeling container with the CONT_M identifier. The metamodel with the META_MODEL identifier is available in the container.

Sub Main;

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 Main;

After executing the example the internal model, that has the name Internal model, is added to the chain of metamodel calculation.

See also:

IMsCalculationChainModel