IDimElementArray.Remove

Syntax

Remove(Element: Integer): Boolean;

Parameters

Element — element index in the array.

Description

The Remove method removes element with the Element index from the array and returns True if element is successfully removed.

Example

Sub Main;

Var

MB: IMetabase;

Dimen: IDimInstance;

Elem: IDimElements;

ElemArr: IDimElementArray;

s: String;

Begin

MB:=MetabaseClass.Active;

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

Elem:=Dimen.Elements;

ElemArr:=Elem.Children(10);

If ElemArr.Remove(ElemArr.Count-1) Then

s:="Removed";

Else

s:="It is not removed";

End If;

End Sub Main;

After executing the example the "s" variable contains Removed if the last array element is successfully removed.

See also:

IDimElementArray