FindById(IndexId: String): IDimIndexInstance;
IndexId - index ID on which the search is based.
The FindById method searches and returns object containing dictionary index. Search is executed by the identifier passed by the IndexId parameter.
Sub UserProc;
Var
MB: IMetabase;
Dimen: IDimInstance;
Indxs: IDimIndexesInstance;
Index: IDimIndexInstance;
i: Integer;
Begin
MB := MetabaseClass.Active;
Dimen := MB.ItemById("D_TO").Open(Null) As IDimInstance;
Indxs := Dimen.Indexes;
If Indxs.Count <> 0 Then
Index := Indxs.FindById("INDEX1");
If Index <> Null Then
i := Index.Index.Key;
End If;
End If;
End Sub UserProc;
After executing the example the method searches for the index with the Index1 identifier; if successful, the "i" variable shows key of the found index.
See also: