IFormulaTransformModel.RestoreFromFormulaData

Syntax

RestoreFromFormulaData(FormulaData: IRubricatorFormulaData);

Parameters

FormulaData - formula that must be restored.

Description

The RestoreFromFormulaData method restores the calculated series by the specified data of the formula.

Example

Executing the example requires a form, a button with the Button1 identifier on the form, the TabSheetBox component and the UiErAnalyzer component named UiErAnalyzer1, which is used as a data source for TabSheetBox. A working area of the time series database must be loaded to UiErAnalyzer1. This database must contain a formula with the 1 key.

Click the button to execute the example.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

Laner: ILaner;

RubInst: IRubricatorInstance;

FormulaData: IRubricatorFormulaData;

Serie: ILanerCalculateSerie;

Transform: IFormulaTransformModel;

Begin

Laner := UiErAnalyzer1.ErAnalyzer.Laner;

RubInst := Laner.RubricatorInstance;

Laner.BeginUpdate;

FormulaData := RubInst.GetFormulaData(1);

Serie := Laner.Series.AddCalculateSerie(Series restored from formula);

Transform := Serie.Transform;

Transform.RestoreFromFormulaData(FormulaData);

Laner.EndUpdate;

End Sub Button1OnClick;

After executing the example a new calculated series restored from the formula with the 1 key is added.

See also:

IFormulaTransformModel