IMetabaseObjectName.IsDefault

Syntax

IsDefault: Boolean;

IsDefault: boolean;

Description

The IsDefault property returns True if object name is used by default.

Comments

The property is read-only. Default name corresponds to the language by default that is selected for the (IMetabase.DefaultLocale) repository. Name by default is used to display an object name, if there is no name in the current repository language (IMetabase.CurrentLocale).

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;
Begin
    Obj := MetabaseClass.Active.ItemById("Object");
    For Each NameLocale In Obj.Names Do
    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;
Public Shared Sub Main(Params: StartParams);
Var
    Obj: IMetabaseObjectDescriptor;
    NameLocale: IMetabaseObjectName;
Begin
    Obj := Params.Metabase.ItemById["Object"];
    For Each NameLocale In Obj.Names Do
        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:

IMetabaseObjectName