FindNext(Info: IMetabaseObjectFindInfo): IMetabaseObjectDescriptor;
Info. Information required for object description search.
The FindNext method searches the next object that satisfies the search conditions.
The method returns Null if the object was not found.
The Info parameter sends search conditions.
Add a 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;
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;
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.
See also: