IRubricatorSegmentsSet.FindByKey

Syntax

FindByKey(Key: Integer): IRubricatorSegment;

Parameters

Key. Segment key.

Description

The FindByKey method searches for a segment in the collection by its key.

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;
Begin
    Mb := MetabaseClass.Active;
    RubInst := Mb.ItemById("OBJ_RUBRICATOR").Open(NullAs IRubricatorInstance;
    Segs := RubInst.Segments;
    If Segs.FindByKey(1) <> Null Then
        Debug.WriteLine("Segment with the 1 key is found.");
    Else
        Debug.WriteLine("Segment with the 1 key is not found.");
    End If;
End Sub UserProc;

After executing the example the segment with the specified key is searched. Search results are displayed in the console window.

See also:

IRubricatorSegmentsSet