Show contents 

Dimensions > Dimensions Assembly Interfaces > IDimIndexInstance > IDimIndexInstance.CreateDimIndexLookup

IDimIndexInstance.CreateDimIndexLookup

Syntax

CreateDimIndexLookup: IDimIndexInstanceLookup;

Description

The CreateDimIndexLookup method creates an object used to find dictionary elements.

Example

Sub UserProc;
Var
    MB: IMetabase;
    Dimen: IDimInstance;
    IndxsInst: IDimIndexesInstance;
    IndexInst: IDimIndexInstance;
    InstLook: IDimIndexInstanceLookup;
    i: Integer;
Begin
    MB:=MetabaseClass.Active;
    Dimen:=MB.ItemById("D_TO").Open(NullAs IDimInstance;
    IndxsInst:=Dimen.Indexes;
    If IndxsInst.Count<>0 Then
        IndexInst:=IndxsInst.Item(0);
        InstLook:=IndexInst.CreateDimIndexLookup;
        InstLook.AttributeValue(0):=10;
        i:=InstLook.LookUpFirst;
    End If;
End Sub UserProc;

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 contains the number of the found element.

See also:

IDimIndexInstance