IDimElements.PrimaryIndex

Syntax

PrimaryIndex(Element: Integer): IDimIndexInstance;

Parameters

Element — index of dictionary element.

Description

The PrimaryIndex property returns object containing primary index that includes element with the Element index.

Example

Sub Main;

Var

MB: IMetabase;

Dimen: IDimInstance;

Elem: IDimElements;

PrimIndex: IDimIndexInstance;

s: String;

Begin

MB:=MetabaseClass.Active;

Dimen:=MB.ItemById("D_TO").Open(Null) As IDimInstance;

Elem:=Dimen.Elements;

PrimIndex:=Elem.PrimaryIndex(10);

s:=PrimIndex.Index.Name;

End Sub Main;

After executing the example the "i" variable shows name of the primary index that includes the tenth element. Repository object identifier: D_TO.

See also:

IDimElements