IMapTimeDataAdapter.Data

Fore Syntax

Data(Attribute: Variant; TimePointIndex: Integer): Variant;

Fore.NET Syntax

Data[Attribute: System.Object; TimePointIndex: System.Int32]: System.Object;

Parameters

Attribute. Parameter that determines, which data is returned by a time adapter.

TimePointIndex. Parameter that determines a time point.

Description

The Data property returns the value of the time adapter factor to the specified time point.

Fore Example

Executing the example requires a layer with the Regions name. Create a form, add a button with the Button1 name to it, the UiErAnalyzer component with the UiErAnalyzer1 name, specify an express report as an object of the UiErAnalyzer1 component. Add a link to the Map system assembly.

Class OBJ109300Form: Form
    Button1: Button;
    UiErAnalyzer1: UiErAnalyzer;
    Button1: Button;

    Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
    Var i: integer; Map: IMap;
        Visuals: IMapLayerVisuals;
        DA: IMapTimeDataAdapter;
    Begin
    
        Map := UiErAnalyzer1.ErAnalyzer.Map.Map;
        Visuals := Map.Layers.FindByName("Regions").Visuals;
        DA := Visuals.Item(0).DataAdapter As IMapTimeDataAdapter;
        For i := 0 To DA.TimePointsCount - 1 Do
            Debug.WriteLine("Name " + DA.TimePointName(i));
            Debug.WriteLine("Value " + DA.Data(14, i) As String);
        End For;
    End Sub Button1OnClick;

End Class OBJ109300Form;

After executing the example on clicking the Button1 button, the output shows point name and the factor value for each time point.

Fore.NET Example

Executing the example requires a layer with the Regions name. Create a form, add a button with the Button1 name, the uiErAnalyzerNet component with the uiErAnalyzerNet1 name, specify an express report as the UiErAnalyzer1 component, set the Active property of uiErAnalyzerNet1 component to True. Add a link to the Map system assembly.

Imports System;
Imports System.Collections.Generic;
Imports System.ComponentModel;
Imports System.Data;
Imports System.Drawing;
Imports System.Text;
Imports System.Windows.Forms;
Imports Prognoz.Platform.Forms.NET;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Map;


Public Partial Class OBJ941Form: Prognoz.Platform.Forms.NET.ForeNetForm
    Public Constructor OBJ941Form();
    Begin
        InitializeComponent();
    End Constructor;


    Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
    Var i: integer;
        Map: IMap;
        Visuals: IMapLayerVisuals;
        DA: IMapTimeDataAdapter;
    Begin
        Map := uiErAnalyzerNet1.ErAnalyzer.ErAnalyzer.Map.Map;
        Visuals := Map.Layers.FindByName["Regions"].Visuals;
        DA := Visuals.Item[0].DataAdapter As IMapTimeDataAdapter;
        For i := 0 To DA.TimePointsCount - 1 Do
            System.Diagnostics.Debug.WriteLine("Name " + DA.TimePointName[i]);
            System.Diagnostics.Debug.WriteLine("Value " + DA.Data[14, i] As String);
        End For;
    End Sub;
End Class;

After executing the example on clicking the Button1 button, the output shows point name and the factor value for each time point.

See also:

IMapTimeDataAdapter