IVZTimeLine.CurrentIndex

Syntax

CurrentIndex: Integer;

Description

The CurrentIndex property determines index of timeline current step.

Example

Executing the example requires that the repository contains an express report with the EXP identifier. The unit containing the example should have links to the Express, Metabase and Visualizators system assemblies. The specified procedure should be called from the Main entry point.

Before executing the example the bubble tree timeline looks as shown on the IVZTimeLine interface description page. Increase bubble tree animation time while moving from one timeline 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;
    EaxAnalyzer: IEaxAnalyzer;
    BubbleTree: IVZBubbleTree;
    TimeLine: IVZTimeLine;
    Index: Integer;
    StepName: String;
Begin
    // Get the current repository
    Metabase := MetabaseClass.Active;
    // Get express report
    EaxAnalyzer := Metabase.ItemById("EXP").Edit As IEaxAnalyzer;
    // Get bubble tree
    BubbleTree := EaxAnalyzer.BubbleTree.BubbleTree;
    // Get time line
    TimeLine := BubbleTree.TimeLine;
    { Set duration of visualizer animation 
    while moving from one step of time scale to another }

    TimeLine.StepDuration := 5;
    // Set visualizer animation delay time duration
    TimeLine.DelayDuration := 3;
    // Information about scale position in visualizer workspace
    Debug.WriteLine("Timeline is overlayed on working area (true): " +  TimeLine.IsOverlap.ToString); 
    // Deny timeline return to original 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 the current step on timeline: 1991
 

Play bubble tree animation when switching between timeline steps. Now the transition time is five seconds, and the delay in switching between the steps is three seconds. On finishing the animation the timeline is not returned to the initial state:

See also:

IVZTimeLine