IMetabaseCustomClasses.FindByClassId

Syntax

FindByClassId(ClassId: Integer): IMetabaseCustomClass;

Description

The FindByClassId method searches for a class by numeric identifier of custom repository object.

Example

Executing the example requires that the repository contains a custom repository object with the CUSTOM_OBJECT identifier.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    MB: IMetabase;
    Extender: IMetabaseCustomExtender;
    Custom: IMetabaseCustomClass;
Begin
    MB := MetabaseClass.Active;
    Extender := MB.SpecialObject(MetabaseSpecialObject.CustomExtender).Edit 
As IMetabaseCustomExtender;
    Custom := Extender.Classes.FindByClassId(MB.ItemById(
"CUSTOM_OBJECT").ClassId);
    Debug.WriteLine(Custom = 
Null ? "Null" : Custom.Name);
End Sub UserProc;

After executing the example the class will be searched by identifier. If description is obtained, it will be displayed in the development environment console.

See also:

IMetabaseCustomClasses