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

Var

MB: IMetabase;

CubeInst: ICalculatedCubeInstance;

Coord: ICalculatedCubeInstanceCoord;

Formulas: ICalculatedCubeFormulas;

Formula: ICalculatedCubeFormula;

Begin

MB := MetabaseClass.Active;

CubeInst := MB.ItemById("Calc_Cube").Open(Null) As 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[0] As ICalculatedCubeInstanceCoord;

Debug.WriteLine(Coord.AsString);

End Sub Main;

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

See also:

ICalculatedCubeFormula