IDimIterator.NewIterator

Syntax

NewIterator(Offset: Integer): IDimIterator;

Parameters

Offset - value that determines offset of the new iterator.

Description

The NewIterator method creates a new iterator elements of which are shifted by the Offset elements.

Example

Sub UserProc;
Var
    MB: IMetabase;
    Dimen: IDimInstance;
    Elem: IDimElements;
    ElemArr: IDimElementArray;
    Iter, Iter1: IDimIterator;
Begin
    MB:=MetabaseClass.Active;
    Dimen:=MB.ItemById("D_TO").Open(NullAs IDimInstance;
    Elem:=Dimen.Elements;
    ElemArr:=Elem.Children(10);
    Iter:=ElemArr.Iterator;
    Iter1:=Iter.NewIterator(3);
End Sub UserProc;

Executing the example creates two iterators based on elements of the ElemArr array. Element indexes in the Iter1 iterator are offset by 3.

See also:

IDimIterator