Find(Element: Integer): Integer;
Element — element index in the array.
The Find method searches for dictionary element with the index Element in array. If successful, it returns element index in the array; otherwise it returns "-1".
Sub Main;
Var
MB: IMetabase;
Dimen: IDimInstance;
Elem: IDimElements;
ElemArr: IDimElementArray;
i: Integer;
Begin
MB:=MetabaseClass.Active;
Dimen:=MB.ItemById("D_TO").Open(Null) As IDimInstance;
Elem:=Dimen.Elements;
ElemArr:=Elem.Children(10);
i:=ElemArr.Find(96);
End Sub Main;
After executing the example the method searches dictionary element with the index 96 in the ElemArr array. If the search is successful, the "i" variable contains index of array element that corresponds to the specified dictionary element.
See also: