PrimaryIndex(Element: Integer): IDimIndexInstance;
Element — index of dictionary element.
The PrimaryIndex property returns object containing primary index that includes element with the Element index.
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: