IDimElementArray.Add

Syntax

Add(Element: Integer): Boolean;

Parameters

Element — element index in the dictionary.

Description

The Add method adds dictionary element with the Element index and returns True if element is successfully added.

Example

Sub Main;

Var

MB: IMetabase;

Dimen: IDimInstance;

Elem: IDimElements;

ElemArr: IDimElementArray;

b: Boolean;

Begin

MB:=MetabaseClass.Active;

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

Elem:=Dimen.Elements;

ElemArr:=Elem.Children(10);

b:=ElemArr.Add(Dimen.Elements.Elements.Element(31));

End Sub Main;

After executing the example the "b" variable contains True if the 31st dictionary element is successfully added to the ElemArr array.

See also:

IDimElementArray