IMetabaseObjectNames.Count

Syntax

Count: Integer;

Count: integer;

Description

The Count property returns number of object names.

Example

The example requires that the repository contains an object with the Object identifier.

Add a link to the Metabase system assembly.

Sub UserProc;
Var
    Obj: IMetabaseObjectDescriptor;
    NameLocale: IMetabaseObjectName;
    i: Integer;
Begin
    Obj := MetabaseClass.Active.ItemById("Object");
    For i := 0 To Obj.Names.Count - 1 Do
        NameLocale := Obj.Names.Item(i);
        Debug.WriteLine("------------------------");
        Debug.WriteLine("Locale = " + NameLocale.Locale.ToString);
        Debug.WriteLine("Name = " + NameLocale.Name);
        Debug.WriteLine("Default name = " + NameLocale.IsDefault.ToString);
    End For;
End Sub UserProc;
Imports Prognoz.Platform.Interop.ForeSystem;
 
Public Shared Sub Main(Params: StartParams);
Var
    Obj: IMetabaseObjectDescriptor;
    NameLocale: IMetabaseObjectName;
    i: Integer;
Begin
    Obj := Params.Metabase.ItemById[
"Object"];
    
For i := 0 To Obj.Names.Count - 1 Do
        NameLocale := Obj.Names.Item[i];
        System.Diagnostics.Debug.WriteLine(
"------------------------");
        System.Diagnostics.Debug.WriteLine(
"Locale = " + NameLocale.Locale.ToString());
        System.Diagnostics.Debug.WriteLine(
"Name = " + NameLocale.Name);
        System.Diagnostics.Debug.WriteLine(
"Default name = " + NameLocale.IsDefault.ToString());
    
End For;
End Sub;

After executing this example all object elements are displayed in the console window.

See also:

IMetabaseObjectNames