IDimElements.Name

Fore Syntax

Name(Element: Integer): String;

Fore.NET Syntax

Name[Element: uinteger]: string;

Parameters

Element — index of dictionary element.

Description

The Name property returns value of Name attribute for the element with the Element index.

Comments

The IDimAttributeInstance.DisplayValue property is used to get value of this property.

If alternative hierarchy is set for a dictionary, this property cannot be used to get element's name.

Fore Example

Executing the example requires that the repository contains a dictionary with the D_TO identifier.

Add links to the Metabase and Dimensions system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Dimen: IDimInstance;
    Elem: IDimElements;
    s: String;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    Dimen := MB.ItemById("D_TO").Open(NullAs IDimInstance;
    Elem := Dimen.Elements;
    For i := 0 To Elem.Count - 1 Do
        s := Elem.Name(i) + "; ";
        Debug.WriteLine(s);
    End For;
End Sub UserProc;

After executing the example the console window shows values of the Name attribute of the dictionary element.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore Example.

Imports Prognoz.Platform.Interop.Dimensions;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    Dimen: IDimInstance;
    Elem: IDimElements;
    s: String;
    i: UInt32;
Begin
    MB := Params.Metabase;
    Dimen := MB.ItemById["D_TO"].Open(NullAs IDimInstance;
    Elem := Dimen.Elements;
    For i := 0 To Elem.Count - 1 Do
        s := Elem.Name[i];
        System.Diagnostics.Debug.WriteLine(s + "; ");
    End For;
End Sub;

See also:

IDimElements