IMsCalculationChainIterator.ParameterAsGroup

Syntax

ParameterAsGroup: IMsModelParam;

Description

The ParameterAsGroup property determines the parameter identifier that sets the elements, by which the cycle is calculated.

Comments

If the value of this property is set, the IMsCalculationChainIterator.Selection and IMsCalculationChainIterator.ElementGroup properties are ignored.

Example

Executing the example requires that the repository contains a dictionary with the D_SOURCE identifier and a modeling container with the CONT_ITERATOR identifier. The container must contain a metamodel with the META_MODEL identifier and a model with the MODEL identifier.

Add links to the Metabase and Ms system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    pModelSpace: IMetabaseObjectDescriptor;
    pMetaModel: IMsMetaModel;
    DictDescr: IMetabaseObjectDescriptor;
    pIterator: IMsCalculationChainIterator;
    param: IMsModelParam;
    params: IMsModelParams;
Begin
    mb := MetabaseClass.Active;
    pModelSpace := mb.ItemById("CONT_ITERATOR");
    pMetaModel := mb.ItemByIdNamespace("META_MODEL", pModelSpace.Key).Edit As IMsMetaModel;
    params := pMetaModel.Params;
    params.Clear;
    param := params.Add;
    param.DataType := DbDataType.Integer;
    param.DefaultValue := 1;
    DictDescr := mb.ItemById("D_SOURCE");
    param.LinkedObject := DictDescr.Bind;
    pMetaModel.CalculationChain.Clear;
    pIterator := pMetaModel.CalculationChain.AddIterator("Test");
    pIterator.Contents.Clear;
    pIterator.Contents.AddModel(mb.ItemByIdNamespace("MODEL", pModelSpace.Key).Bind As IMsModel);
    pIterator.ParameterAsGroup := param;
    (pMetaModel As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the cycle with parameter is added to the metamodel chain. The parameter sets the elements, by which the calculation is executed.

See also:

IMsCalculationChainIterator