IDimIterator.Next

Syntax

Next: Boolean;

Description

The Next method moves to the next iterator element and returns True if iterator allows moving farther. If the cursor is placed at the last position in the iterator, the method returns False. The first call moves cursor to the first element.

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