ICalculatedCubeFormula.GetTerms

Syntax

GetTerms: Array;

Description

The GetTerms method returns the terms array used in a formula.

Example

Executing the example requires that the repository contains a calculated cube with the Calc_Cube identifier. The cube contains two dimensions that are not fixed.

Sub UserProc;
Var
    MB: IMetabase;
    CubeInst: ICalculatedCubeInstance;
    Coord: ICalculatedCubeInstanceCoord;
    Formulas: ICalculatedCubeFormulas;
    Formula: ICalculatedCubeFormula;
Begin
    MB := MetabaseClass.Active;
    CubeInst := MB.ItemById("Calc_Cube").Open(NullAs ICalculatedCubeInstance;
    Coord := CubeInst.CreateCoord;
    Coord.MatrixCoord.Item(0) := 0;
    Coord.MatrixCoord.Item(1) := 0;
    Formulas := CubeInst.Formula(Coord);
    Formula := Formulas.Item(0);
    Coord := Formula.GetTerms[0As ICalculatedCubeInstanceCoord;
    Debug.WriteLine(Coord.AsString);
End Sub UserProc;

After executing the example the development environment console displays a symbolic sign of the coordinate, to which a term, that is used to create the first formula, corresponds.

See also:

ICalculatedCubeFormula