IMetabaseObjectFindInfo.Scope

Syntax

Scope: IMetabaseObjectDescriptor;

Scope: Prognoz.Platform.Intertop.Metabase.IMetabaseObjectDescriptor;

Description

The Scope property determines the area for search.

Comments

The property is set to Null by default, the search is performed over the whole repository.

Example

Executing the example requires a folder with the Folder_1 identifier in repository.

To execute the 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.ClassId := MetabaseObjectClass.KE_CLASS_FORM;
    FInfo.Scope := MB.ItemById("Folder_1");
    FInfo.WholeWordsOnly := False;
    MDescs := MB.Find(FInfo);
    For Each MDesc In MDescs Do
        Debug.WriteLine("Identifier: " + MDesc.Id + "; Name: " + MDesc.Name);
    End For;
End Sub UserProc;
Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    MDescs: IMetabaseObjectDescriptors;
    MDesc: IMetabaseObjectDescriptor;
    FInfo: IMetabaseObjectFindInfo;
Begin
    MB := Params.Metabase;
    FInfo := MB.CreateFindInfo();
    FInfo.ClassId := MetabaseObjectClass.KE_CLASS_FORM As INTEGER;
    FInfo.Scope := MB.ItemById["Folder_1"];
    FInfo.WholeWordsOnly := False;
    MDescs := MB.Find(FInfo);
    For Each MDesc In MDescs Do
        System.Diagnostics.Debug.WriteLine("Identifier: " + MDesc.Id + "; Name: " + MDesc.Name);
    End For;
End Sub;

After executing this example the search of all forms is performed in the specified folder. Names and identifiers of the found objects are displayed in the development environment console.

See also:

IMetabaseObjectFindInfo