ICalculatedCubeInstance.SaveFormulasToFile

Syntax

SaveFormulasToFile(FileName: String; Selection: IDimSelectionSet);

Parameters

FileName - name and path to the file, in which calculated cube formulas are saved.

Selection - selection of cube elements, by which formulas must be saved.

Description

The SaveFormulasToFile method saves calculated cube formulas to a file.

Example

Executing the example requires that the repository contains a calculated cube with the Calc_Cube identifier.

Sub Main;

Var

MB: IMetabase;

CubeInst: ICalculatedCubeInstance;

DimSS: IDimSelectionSet;

DimSel: IDimSelection;

Begin

MB := MetabaseClass.Active;

CubeInst := MB.ItemById("Calc_Cube").Open(Null) As ICalculatedCubeInstance;

DimSS := CubeInst.Destination.CreateDimSelectionSet;

For Each DimSel In DimSS Do

DimSel.SelectAll;

End For;

CubeInst.SaveFormulasToFile("C:\formul.txt", DimSS);

End Sub Main;

After executing the example formulas of the Calc_Cube calculated cube are saved in the file formul.txt.

See also:

ICalculatedCubeInstance