IMsFormulaTermInfo.Slice

Syntax

Slice: IMsFormulaTransformSlice;

Description

The Slice property determines variable slice corresponding to the given term.

Example

Executing the example requires that the repository contains a modeling container with the KONT_MODEL identifier. This container contains a modeling problem with the NEW_NONLINREG identifier that uses the non-linear regression method for calculation.

Add links to the Dimensions, Metabase, Ms system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Model: IMsModel;
    Trans: IMsFormulaTransform;
    NonLinear: IMsNonLinearRegressionTransform;
    Oper: IMsFormulaTermList;
    Info: IMsFormulaTermInfo;
    Slice: IMsFormulaTransformSlice;
    Sels: IDimSelectionSet;
    Sel: IDimSelection;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    Model := MB.ItemByIdNamespace("New_NonLinReg",MB.ItemById("KONT_MODEL").Key).Bind As IMsModel;
    Trans := Model.Transform;
    NonLinear := Trans.FormulaItem(0).Method As IMsNonLinearRegressionTransform;
    Oper := NonLinear.Operands;
    For i := 0 To Oper.Count - 1 Do
        Info := Oper.Item(i).TermInfo;
        Slice := Info.Slice;
        Debug.WriteLine(Slice.Id+ " " + Slice.Name);
        Sels := Slice.Selection;
        For Each Sel In Sels Do
            Debug.WriteLine("Dimension:" + Sel.Dimension.Ident + "; Selected elements: " + Sel.ToString);
        End For;
    End For;
End Sub UserProc;

After executing the example the information the development environment console displays information about slices, to which the terms created in this model, are corresponded. Names of slices, identifiers of the modeling variables, on the basis of which they are created are displayed, as well as the selection by the additional dimensions if they are available in variables is displayed.

See also:

IMsFormulaTermInfo