IMetabase.Item

Syntax

Item(Key: Integer): IMetabaseObjectDescriptor;

Parameters

Key. Repository object key.

Description

The Item property returns repository object description with the specified key.

Comments

The property returns Null, if object with the specified key is absent in repository.

Example

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

Sub UserProc;
Var
    MB: IMetabase;
    MDesc: IMetabaseObjectDescriptor;
Begin
    MB := MetabaseClass.Active;
    MDesc := MB.Item(
100);
    
If MDesc <> Null Then
    Debug.WriteLine(MDesc.Id);
    
Else
    Debug.WriteLine(
"Object with the 100 key is absent in repository.");
End If;
End Sub UserProc;

After executing the example if an object with the 100 key exists in the repository, its identifier is displayed in a development environment console.

See also:

IMetabase