CreateFactor([SaveOptions: LnSaveOptions= 255]): IRubricatorFactor;
SaveOptions. An optional parameter that indicates the changes to be saved.
The CreateFactor method creates a factor based on a calculated series.
Executing the example requires a form with the Button1 button, the LanerBox component with the LanerBox1 identifier and the UiErAnalyzer component used as a data source for LanerBox. UiErAnalyzer must contain the working area of the time series database that contains child series.
Before executing the example value of all child series mandatory attributes should be set. Click the button to start executing this example.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
ErAn: IEaxAnalyzer;
Laner: ILaner;
LanerSers: ILanerSeries;
Serie: ILanerSerie;
j: Integer;
DerivedSerie: ILanerDerivedSerie;
Factor: IRubricatorFactor;
Begin
ErAn := UiErAnalyzer1.ErAnalyzer;
Laner := ErAn.Laner;
Laner.BeginUpdate;
LanerSers := Laner.Series;
For j := 0 To Laner.SeriesList.Count - 1 Do
Serie := Laner.SeriesList.Item(j);
If Serie.Kind = LnSerieKind.Derived Then
DerivedSerie := Serie As ILanerDerivedSerie;
Factor := DerivedSerie.CreateFactor(LnSaveOptions.Name);
LanerSers.AddSourceSerie(Factor);
End If;
End For;
Laner.EndUpdate;
End Sub Button1OnClick;
After executing the example, factors are created on the basis of child series of a calculated series. The series, based on these factors, are added to the data table.
See also: