ICalculatedCubeInstance.LoadFormulasFromFile

Syntax

LoadFormulasFromFile(FileName: String; [Append: Boolean = False]);

Parameters

FileName - name and path to the file, from which calculated cube formulas are loaded.

Append - optional parameter that determines whether formulas are added to existing cube. The False value is passed by default, before the loading all existing formulas are deleted. If the parameter is set to True, formulas in the cube are substituted by the existing in the file coordinates only, other formulas are saved.

Description

The LoadFormulasFromFile method loads calculated cube formulas from 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;

Begin

MB := MetabaseClass.Active;

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

CubeInst.LoadFormulasFromFile("c:\formul.txt", True);

CubeInst.SaveFormulas;

End Sub Main;

After executing the example formulas from the file formul.txt are loaded to the cube. Formulas by existing in file coordinates are changed, other formulas are saved.

See also:

ICalculatedCubeInstance