RevisionKey: Integer;
The RevisionKey property returns the key of the revision, in which the calculated series was created.
The property is read-only.
Executing the example requires a form with the following components: the Button component named Button1, the TabSheetBox component named TabSheetBox1, and the UiErAnalyzer component named UiErAnalyzer1. UiErAnalyzer1 is a data source for TabSheetBox1. A working area of the time series database should be loaded to UiErAnalyzer1. The database should contain an indicator with the 108310 key.
The example is a handler of the OnClick event for the Button1 component.
Add links to the Cubes, Express, ExtCtrls, Forms, Laner, and Tab system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
ErAn: IEaxAnalyzer;
Laner: ILaner;
LanSers: ILanerSeries;
RubInst: IRubricatorInstance;
RubFact: IRubricatorFactor;
Rev: IRubricatorRevision;
CalcSer: ILanerCalculateSerie;
Begin
ErAn := UiErAnalyzer1.ErAnalyzer;
Laner := ErAn.Laner;
Laner.BeginUpdate;
LanSers := Laner.Series;
RubInst := Laner.RubricatorInstance;
RubFact := RubInst.GetFactData(108310).Factor;
Rev := RubInst.OpenRevision("New Revision");
CalcSer := LanSers.AddCalculateSerieAsSource(RubFact, Rev.Key);
CalcSer.Name := "CalculateSerieAsSource (" + CalcSer.SourceStub.Name + ")";
CalcSer.SaveLikeSource := True;
Debug.WriteLine(CalcSer.RevisionKey);
Laner.EndUpdate;
End Sub Button1OnClick;
After executing the example the calculated series based on the indicator with the specified key is added to the workbook. The console window displays key of the revision, in which the series is created.
See also: