LookUp: IDimElementArray;
The LookUp method searches for elements meeting certain condition and returns an array of found elements.
Sub Main;
Var
MB: IMetabase;
Dimen: IDimInstance;
IndxsInst: IDimIndexesInstance;
IndexInst: IDimIndexInstance;
InstLook: IDimIndexInstanceLookup;
LookElem: IDimElementArray;
i: Integer;
Begin
MB:=MetabaseClass.Active;
Dimen:=MB.ItemById("D_TO").Open(Null) As IDimInstance;
IndxsInst:=Dimen.Indexes;
If IndxsInst.Count<>0 Then
IndexInst:=IndxsInst.Item(0);
InstLook:=IndexInst.CreateDimIndexLookup;
InstLook.AttributeValue(0):=10;
LookElem:=InstLook.LookUp;
i:=LookElem.Count;
End If;
End Sub Main;
After executing the example the search is carried out by attribute of the first dictionary index. Searched value: 10. If the search is successful, the "i" variable shows the number of found elements.
See also: