IPPSpeedometerArrows.Count

Syntax

Count: Integer;

Description

The Count property returns the size of the arrows collection.

Example

Executing the example requires that the repository contains a database with the ADHOC identifier. A dashboard must contain a speedometer.

Add links to the Adhoc, Express, Metabase, Speedometer system assemblies.

Sub UserProc;
Var
    Speedometer: IPPSpeedometer;
    MB: IMetabase;
    AdhocReport: IAdhocReport;
    EaxSpeedometer: IEaxSpeedometer;
    Enalyzer: IEaxAnalyzer;
    DsObjs: IAdhocDataSourceObjects;
    Scales: IPPSpeedometerScales;
    Scale: IPPSpeedometerScale;
    Arrows: IPPSpeedometerArrows;
    Arrow: IPPSpeedometerArrowBase;
Begin
    MB := MetabaseClass.Active;
    // Get dashboard 
    AdhocReport := MB.ItemById("ADHOC").Edit As IAdhocReport;
    // Get dashboard data sources
    DsObjs := AdhocReport.DataSourceObjects;
    // Get speedometer
    Enalyzer := DsObjs.Item(0).GetSourceObject As IEaxAnalyzer;
    EaxSpeedometer := Enalyzer.Speedometer;
    // Get speedometer parameters
    Speedometer := EaxSpeedometer.Speedometer;
    // Get collection of speedometer scales
    Scales := Speedometer.Scales;
    // Get data scale
    Scale := Scales.DataScale;
    // Get collection of speedometer scale arrows
    Arrows := Scale.Arrows;
    // Get first arrow in collection
    Arrow := Arrows.Item(0);
    Arrow.ID := "ArrowCopy";
    // Add arrow to collection
    Arrows.Add(Arrow);
    // Output size of arrows collection
    Debug.WriteLine("Arrows in collection: " + Arrows.Count.ToString);
    // Clear collection
    Arrows.RemoveAll;
    (Enalyzer As IMetabaseObject).Save;
End Sub UserProc;

After executing the example a copy of the first arrow is added to the collection of scale arrows. The console window displays size of the arrows collection, after which all arrows are removed from the collection.

See also:

IPPSpeedometerArrows