IMetabaseObjectDescriptor.FindNext

Fore Syntax

FindNext(Info: IMetabaseObjectFindInfo): IMetabaseObjectDescriptor;

Fore.NET Syntax

FindNext(Info: Prognoz.Platform.Interop.Metabase.IMetabaseObjectFindInfo): Prognoz.Platform.Interop.Metabase.IMetabaseObjectDescriptor;

Parameters

Info. Information required for object description search.

Description

The FindNext method searches the next object that satisfies the search conditions.

Comments

The method returns Null if the object was not found.

The search conditions are passed by the Info parameter.

Fore Example

Add link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    FInfo: IMetabaseObjectFindInfo;
    MDesc: IMetabaseObjectDescriptor;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    FInfo := MB.CreateFindInfo;
    FInfo.Text := 
"Form";
    FInfo.Attribute := FindAttribute.NameOrIdent;
    FInfo.WholeWordsOnly := 
False;
    MDesc := MB.Root;
    
For i := 0 To 9 Do
    MDesc := MDesc.FindNext(FInfo);
    
If MDesc <> Null Then
        Debug.WriteLine(
Identifier:  + MDesc.Id + "; Name: " + MDesc.Name);
    
Else
        
Break
    
End If;
End For;
    
End Sub UserProc;

After executing the example the search of first ten objects containing the text "Form" in the name or in the identifier is performed. A list of found objects is displayed in the development environment console.

Fore.NET Example

The requirements and result of the Fore.NET Example execution match with those in the Fore Example.

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    FInfo: IMetabaseObjectFindInfo;
    MDesc: IMetabaseObjectDescriptor;
    i: Integer;
Begin
    MB := Params.Metabase;
    FInfo := MB.CreateFindInfo();
    FInfo.Text := "Form";
    FInfo.Attribute := FindAttribute.fnaNameOrIdent;
    FInfo.WholeWordsOnly := False;
    MDesc := MB.Root;
    For i := 0 To 9 Do
    MDesc := MDesc.FindNext(FInfo);
    If MDesc <> Null Then
        System.Diagnostics.Debug.WriteLine(Identifier:  + MDesc.Id + "; Name: " + MDesc.Name);
    Else
        Break
    End If;
End For;
End Sub;

See also:

IMetabaseObjectDescriptor