IMetabase.Find

Syntax

Find(Info: IMetabaseObjectFindInfo): IMetabaseObjectDescriptors;

Parameters

Info. Information to search repository object.

Description

The Find method searches object (objects) corresponding to search conditions.

Comments

The method returns an empty collection of descriptions, if none object is found.

Example

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    MDescs: IMetabaseObjectDescriptors;
    MDesc: IMetabaseObjectDescriptor;
    FInfo: IMetabaseObjectFindInfo;
Begin
    MB := MetabaseClass.Active;
    FInfo := MB.CreateFindInfo;
    FInfo.Text := "OBJTEST";
    FInfo.Attribute := FindAttribute.NameOrIdent;
    FInfo.WholeWordsOnly := False;
    MDescs := MB.Find(FInfo);
    If MDescs.Count <> 0 Then
        For Each MDesc In MDescs Do
            Debug.WriteLine("Identifier: " + MDesc.Id + "; Name: " + MDesc.Name);
        End For;
    Else
        Debug.WriteLine("Objects are not found.");
End If;
End Sub UserProc;

After executing the example all objects containing in the name or in the identifier the OBJTEST text are searched. Names and identifiers of the found objects are displayed in the development environment console.

See also:

IMetabase