Count: Integer;
The Count property returns number of object names.
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;
After executing the example all object elements are displayed in the console window.
See also: