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 UserProc;
Var
    MB: IMetabase;
    Dimen: IDimInstance;
    Selection: IDimSelection;
    s: String;
Begin
    MB:=MetabaseClass.Active;
    Dimen:=MB.ItemById("D_TO").Open(NullAs IDimInstance;
    Selection:=Dimen.Elements.Children(11).Selection;
    If Selection.IsElementSelected(20Then
        s:="Selected";
    Else
        s:="It is not selected";
    End If;
End Sub UserProc;

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

See also:

IDimSelection