IPPSpeedometer.ID

Fore Syntax

ID: String;

Fore.NET Syntax

ID: string;

Description

The ID property determines a speedometer identifier.

Fore 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;
Begin
    MB := MetabaseClass.Active;
    // Get dashboard 
    AdhocReport := MB.ItemById("ADHOC").Bind 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;
    Debug.WriteLine("Speedometer identifier: " + Speedometer.ID);
    Debug.WriteLine("Width: " + Speedometer.Width.ToString);
    Debug.WriteLine("Height: " + Speedometer.Height.ToString);
    Debug.WriteLine("Speedometer transparency: " + Speedometer.Opacity.ToString);
End Sub UserProc;

After executing the example the console window displays messages about speedometer identifier, width and height, transparency level.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.AdHoc;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Speedometer;

Public Shared Sub Main(Params: StartParams);
Var
    Speedometer: IPPSpeedometer;
    MB: IMetabase;
    AdhocReport: IAdhocReport;
    EaxSpeedometer: IEaxSpeedometer;
    Enalyzer: IEaxAnalyzer;
    DsObjs: IAdhocDataSourceObjects;
Begin
    MB := Params.Metabase;
    // 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;
    System.Diagnostics.Debug.WriteLine("Speedometer identifier: " + Speedometer.ID);
    System.Diagnostics.Debug.WriteLine("Width: " + Speedometer.Width.ToString());
    System.Diagnostics.Debug.WriteLine("Height: " + Speedometer.Height.ToString());
    System.Diagnostics.Debug.WriteLine("Speedometer transparency: " + Speedometer.Opacity.ToString());
End Sub;

See also:

IPPSpeedometer

Related work items

Requirement