IRubricatorSegment.Key

Syntax

Key: Integer;

Description

The Key property returns key of a data segment.

Example

Executing the example requires that the repository contains a time series database with the OBJ_RUBRICATOR identifier, in which segments must be determined.

Sub UserProc;
Var
    Mb: IMetabase;
    RubInst: IRubricatorInstance;
    Segs: IRubricatorSegments;
    Seg: IRubricatorSegment;
    i: Integer;
Begin
    Mb := MetabaseClass.Active;
    RubInst := Mb.ItemById("OBJ_RUBRICATOR").Open(NullAs IRubricatorInstance;
    Segs := RubInst.Segments;
    Seg := Segs.Item(0);
    Debug.WriteLine("Segment key: " + Seg.Key.ToString);
    i := Seg.Type;
    Select Case i
        Case 1: Debug.WriteLine("Segment type: Data range");
        Case 2: Debug.WriteLine("Segment type: Time range");
    End Select;
End Sub UserProc;

After executing the example key and type of the first segment of the time series database data are displayed in the console window.

See also:

IRubricatorSegment