CreateCopy: IDimElementArray;
The CreateCopy method creates a copy of element array.
Sub Main;
Var
MB: IMetabase;
Dimen: IDimInstance;
Elem: IDimElements;
ElemArr, ElemArr1: IDimElementArray;
Begin
MB:=MetabaseClass.Active;
Dimen:=MB.ItemById("D_TO").Open(Null) As IDimInstance;
Elem:=Dimen.Elements;
ElemArr:=Elem.Children(10);
ElemArr1:=ElemArr.CreateCopy;
End Sub Main;
After executing the example the ElemArr1 variable contains a copy of the ElemArr array.
See also: