IMetabase.GetItems

Fore Syntax

GetItems(Keys: Array): IMetabaseObjectDescriptors;

Fore.NET Syntax

GetItems(Keys: System.Array): Prognoz.Platform.Interop.Metabase.IMetabaseObjectDescriptors;

Parameters

Keys is an integer array, containing objects keys.

Description

The GetItems method returns the collection of description of the objects, which keys are passed by the Keys parameter.

Comments

Only existing objects are included in the collection. If an object with any key is not found, this key is skipped. And the exception error is not generated.

Fore Example

To execute the example, add a link to the Metabase system assembly.

Sub UserProc;
Var
    mb: IMetabase;
    key: Array[2Of Integer;
    MDescs: IMetabaseObjectDescriptors;
    Desc: IMetabaseObjectDescriptor;
    i: Integer;
Begin
    mb := MetabaseClass.Active;
    key[0] := 5781;
    key[1] := 5782;
    MDescs := mb.GetItems(key);
    For i := 0 To MDescs.Count - 1 Do
        Desc := MDescs.Item(i);
        Debug.WriteLine("Identifier: " + Desc.Id + "; Name: " + Desc.Name);
    End For;
End Sub UserProc;

After executing the example the console window will show identifiers and names corresponding to the objects with set keys.

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;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    key: Array[2Of Integer;
    MDescs: IMetabaseObjectDescriptors;
    Desc: IMetabaseObjectDescriptor;
    i: Integer;
Begin
    mb := Params.Metabase;
    key[0] := 5781;
    key[1] := 5782;
    MDescs := mb.GetItems(key);
    For i := 0 To MDescs.Count - 1 Do
        Desc := MDescs.Item[i];
        System.Diagnostics.Debug.WriteLine("Identifier: " + Desc.Id + "; Name: " + Desc.Name);
    End For;
End Sub;

See also:

IMetabase