Show contents 

Dimensions > Dimensions Assembly Interfaces > IDimElementArray > IDimElementArray.Add

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 UserProc;
Var
    MB: IMetabase;
    Dimen: IDimInstance;
    Elem: IDimElements;
    ElemArr: IDimElementArray;
    b: Boolean;
Begin
    MB:=MetabaseClass.Active;
    Dimen:=MB.ItemById("D_TO").Open(NullAs IDimInstance;
    Elem:=Dimen.Elements;
    ElemArr:=Elem.Children(10);
    b:=ElemArr.Add(Dimen.Elements.Elements.Element(31));
End Sub UserProc;

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

See also:

IDimElementArray