GetFormulaData(FormulaKey: Integer; [Options: DictionaryGetDataOptions = 0]): IRubricatorFormulaData;
FormulaKey. Key of the formula, which data must be obtained.
Options. Parameter of getting data. Optional parameter.
The GetFormulaData method returns formula data by the specified key.
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 UserProc;
Var
Mb: IMetabase;
RubInst: IRubricatorInstance;
FormulaData: IRubricatorFormulaData;
Begin
Mb := MetabaseClass.Active;
RubInst := Mb.ItemById("OBJ_RUBRICATOR").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 UserProc;
After executing the example the console window displays XML code of formula with the 1 key.
See also: