IDimIterator.First

Syntax

First;

Description

The First method moves to starting position of the iterator. After the method is called, the cursor points at the element with the index -1.

Example

Sub Main;

Var

MB: IMetabase;

Dimen: IDimInstance;

Elem: IDimElements;

ElemArr: IDimElementArray;

Iter: IDimIterator;

Begin

MB := MetabaseClass.Active;

Dimen := MB.ItemById("D_TO").Open(Null) As IDimInstance;

Elem := Dimen.Elements;

ElemArr := Elem.Children(10);

Iter := ElemArr.Iterator;

Iter.First;

While Iter.Next Do

Debug.WriteLine(Elem.Name(Iter.Element));

End While;

End Sub Main;

Executing the example creates an iterator based on the array of elements named ElemArr. While iterating through element, the development environment console shows names of corresponding dictionary elements.

See also:

IDimIterator