ITabRange.ToDoubleArrayEx

Fore Syntax

ToDoubleArray([Flags: TabRangeToArrayFlags = 0]): Array;

Fore.NET Syntax

ToDoubleArray(Flags: TabRangeToArrayFlags): System.Array;

Parameters

Flags. The checkbox that determines additional transformation parameters.

Description

The ToDoubleArrayEx method transforms the range into integer array with the ability to apply additional transformation parameters.

Comments

The type of applied additional transformation is specified by means of the Flags input parameter.

Fore Example

Executing the example requires a form that contains the Button component with the Button1 identifier, the TabSheetBox component with the TabSheetBox1 identifier and the UiTabSheet component with the UiTabSheet1 identifier. Set the UiTabSheet1 component as a data source for the TabSheetBox1 component.

This example is a handler of the OnClick event for the Button1 component.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    TSheet: ITabSheet;
    TRange: ITabRange;
    Arr: Array Of Double;
Begin
    TSheet := UiTabSheet1.TabSheet;
    TRange := TSheet.View.Selection.Range;
    Arr := TRange.ToDoubleArrayEx(TabRangeToArrayFlags.SkipNonNumbers);
    // Get array length
    Debug.WriteLine("Array length: " + Arr.Length.ToString);
End Sub Button1OnClick;

Clicking the button creates the Arr real array where values of the selected table range are placed. Non numeric values will be skipped. The console displays message about the Arr array length.

Fore.NET Example

The requirements and result of the Fore.NET Example execution match with those in the Fore Example. Use Fore.NET analogs instead of Fore components.

Imports Prognoz.Platform.Interop.Tab;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    TSheet: ITabSheet;
    TRange: ITabRange;
    Arr: Array Of Double;
Begin
    TSheet := UiTabSheetNet1.TabSheetUi.TabSheet;
    TRange := TSheet.View.Selection.Range;
    Arr := TRange.ToDoubleArrayEx(TabRangeToArrayFlags.trtafSkipNonNumbers) As Array Of Double;
    // Get array length
    System.Diagnostics.Debug.WriteLine("Array length: " + Arr.Length.ToString());
End Sub;

See also:

ITabRange