CurrentIndex: Integer;
CurrentIndex: System.Int32;
The CurrentIndex property determines index of time line current step.
Executing the example requires that the repository contains an express report with the EXP identifier. The module containing the example should have links to the Express, Metabase and Visualizators system assemblies. The selected procedure should be called from the Main entry point.
Before executing the example the bubble tree time line looks as shown on the IVZTimeLine interface description page. Increase bubble tree animation time while moving from one time line step to another, and animation delay at each step. Deny to return the scale to its initial state, determine index of the current scale step and its name:
Sub UserProc;
Var
Metabase: IMetabase; // Metabase
EaxAnalyzer: IEaxAnalyzer; // Express report
BubbleTree: IVZBubbleTree; // Bubble tree
TimeLine: IVZTimeLine; // Time scale
Index: Integer; // Index of current step on time scale
StepName: String; // Name of current step on time scale
Begin
// Get metabase object
Metabase := MetabaseClass.Active;
// Open express report
EaxAnalyzer := Metabase.ItemById("EXP").Edit As IEaxAnalyzer;
// Get bubble tree
BubbleTree := EaxAnalyzer.BubbleTree.BubbleTree;
// Get time line
TimeLine := BubbleTree.TimeLine;
{ Set animation time of visualizator
while moving from one step of time scale to another }
TimeLine.StepDuration := 5;
// Set animation delay of visualizer
TimeLine.DelayDuration := 3;
// Information about scale position in visualizer workspace
Debug.WriteLine("Scale overlaps workspace (true): " + TimeLine.IsOverlap.ToString);
// Disable time scale return to its initial state
TimeLine.ReturnToInitialState := False;
// Determine index of time line current step
Index := TimeLine.CurrentIndex;
Debug.WriteLine("Index of current step on time line: " +
Index.ToString);
// Determine name of time line current step
StepName := TimeLine.StepsNames.Item(Index);
Debug.WriteLine("Name of current step on time line: " + StepName);
// Save changes made in express report
(EaxAnalyzer As IMetabaseObject).Save;
End Sub UserProc;
After executing the example timeline settings are changed, the development environment console displays the following information:
Scale overlaps workspace (true): False
Index of the current timeline step: 6
Name of current step on time line: 1991
Play bubble tree animation when switching between time line steps. Now the transition time is five seconds, and the delay in switching between the steps is three seconds. On finishing the animation the time line is not returned to the initial state:
Executing the example requires that the repository contains an express report with the EXP identifier. The selected procedure is the Main entry point in the Program module of the .NET assembly. The Express, Metabase and Visualizators assemblies should be imported to this module from the Prognoz.Platform.Interop system assembly.
The results of the Fore.NET example execution match with that in the Fore example.
Public Shared Sub Main(Params: StartParams);
Var
Metabase: IMetabase; // Metabase
EaxAnalyzer: IEaxAnalyzer; // Express report
BubbleTree: IVZBubbleTree; // Bubble tree
TimeLine: IVZTimeLine; // Time scale
Index: Integer; // Index of current step on time scale
StepName: String; // Name of current step on time scale
Begin
// Get metabase object
Metabase := Params.Metabase;
// Open express report
EaxAnalyzer := Metabase.ItemById["EXP"].Edit() As IEaxAnalyzer;
// Get bubble tree
BubbleTree := EaxAnalyzer.BubbleTree.BubbleTree;
// Get time line
TimeLine := BubbleTree.TimeLine;
{ Set animation time of bubble tree
while moving from one step of time lien to another }
TimeLine.StepDuration := 5;
// Set animation delay of bubble tree
TimeLine.DelayDuration := 3;
// Information about scale position in visualizer workspace
System.Diagnostics.Debug.WriteLine("Scale overlaps workspace (true): " + TimeLine.IsOverlap.ToString());
// Disable time scale return to its initial state
TimeLine.ReturnToInitialState := False;
// Determine index of time line current step
Index := TimeLine.CurrentIndex;
System.Diagnostics.Debug.WriteLine("Index of current step on time line: " +
Index.ToString());
// Determine name of time line current step
StepName := TimeLine.StepsNames.Item[Index] As String;
System.Diagnostics.Debug.WriteLine("Name of current step on time line: " +
StepName);
// Save changes made in express report
(EaxAnalyzer As IMetabaseObject).Save();
End Sub;
See also: