IVZTimeLine.CurrentIndex

Syntax

CurrentIndex: Integer;

Description

The CurrentIndex property determines index of time line current step.

Example

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 specified 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:

See also:

IVZTimeLine