ExecuteMethodEx(Method: LanerBoxMethod; Settings: ILanerBoxMethodSettings): Variant;
Method. Series transformation method.
Settings. Parameters of applying transformation method.
The ExecuteMethodEx method transforms a selected data series using a specified method and selected parameters.
The ILanerBox.CanExecuteMethod property returns whether the specified method can be applied to the selected series.
Executing the example requires a form with a button on named Button1, the LanerBox component named LanerBox1 and the UiErAnalyzer component which is used as a data source for LanerBox. The workbook of the time series database is to be loaded to UiErAnalyzer.
Add link to the Ms system assembly.
This procedure is to be assigned as a handler of the OnClick event for this button. The example is executed on clicking the button.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Sett: ILanerBoxMethodSettings;
Param: Array[4] Of Variant;
Begin
If LanerBox1.CanExecuteMethod(LanerBoxMethod.TermInfoMethod) Then
Sett := New LanerBoxMethodSettings.Create;
Sett.TrySelfExecute := True;
Sett.CreateDerivedSeries := False;
Param[0] := MsInversion.Diff;
Param[1] := MsInversionLag.PrecidingYear;
Param[2] := -3;
Sett.Param := Param;
LanerBox1.ExecuteMethodEx(LanerBoxMethod.TermInfoMethod, Sett);
End If;
End Sub Button1OnClick;
After executing this example selected workbook series are converted to calculated ones calculated as increase of series values to the previous year with a lag of 3.
See also: