IDimSelection.SelectedElementArray

Syntax

SelectedElementArray(Elements: IDimElementArray): IDimElementArray;

Parameters

Elements. Array of elements, presence of which is to be checked.

Description

The SelectedElementArray property checks the availability of the elements passed by the Elements parameter in the Selection selection and returns the array containing shared elements.

Comments

If the Elements parameter value is Null, the method returns the whole array of elements from the selection.

Example

Sub Main;

Var

MB: IMetabase;

Dimen: IDimInstance;

Selection: IDimSelection;

DimArr, DimArr1: IDimElementArray;

i: Integer;

Begin

MB:=MetabaseClass.Active;

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

Selection:=Dimen.CreateSelection;

Selection.SelectElement(10,False);

Selection.SelectElement(15,False);

Selection.SelectElement(20,False);

Selection.SelectElement(25,False);

Selection.SelectElement(30,False);

DimArr:=Dimen.Elements.Children(10);

DimArr1:=Selection.SelectedElementArray(DimArr);

i:=DimArr1.Count;

End Sub Main;

After executing the example the DimArr1 array contains general elements of the Selection selection and of the DimArr array.

See also:

IDimSelection