IDimSelection.IsElementSelected

Syntax

IsElementSelected(Element: Integer): Boolean;

Parameters

Element — element index in the dictionary.

Description

The IsElementSelected method checks if a dictionary element with the Element index is included into selection and returns True if so.

Example

Sub Main;

Var

MB: IMetabase;

Dimen: IDimInstance;

Selection: IDimSelection;

s: String;

Begin

MB:=MetabaseClass.Active;

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

Selection:=Dimen.Elements.Children(11).Selection;

If Selection.IsElementSelected(20) Then

s:="Selected";

Else

s:="It is not selected";

End If;

End Sub Main;

After executing the example the "s" variable contains Selected, if a dictionary element with index 20 is included into selection.

See also:

IDimSelection