IRubricatorInstance.GetFormulaData

Syntax

GetFormulaData(FormulaKey: Integer; [Options: DictionaryGetDataOptions = 0]): IRubricatorFormulaData;

Parameters

FormulaKey. Key of the formula, which data must be obtained.

Options. Parameter of getting data. Optional parameter. Default value - DictionaryGetDataOptions.None (getting data for reading).

Description

The GetFormulaData method returns formula data by the specified key.

Example

Executing the example requires that the repository contains a time series database with the OBJ_RUBRICATOR identifier. A time series database must contain a formulas dictionary.

Sub Main;

Var

mb: IMetabase;

Rub: IMetabaseObject;

RubInst: IRubricatorInstance;

formulaData: IRubricatorFormulaData;

Begin

mb := MetabaseClass.Active;

Rub := mb.ItemById("OBJ_RUBRICATOR").Edit;

RubInst := Rub.Open(Null) As IRubricatorInstance;

formulaData := RubInst.GetFormulaData(1);

If formulaData <> Null

Then

Debug.WriteLine(formulaData.FormulaXML);

Else Debug.WriteLine(Formula with this key does not exist);

End If;

End Sub Main;

After executing the example the console window displays XML code of formula with the 1 key.

See also:

IRubricatorInstance