IDimSelection.IsAnyChildSelected

Syntax

IsAnyChildSelected(Element: Integer): Boolean;

Parameters

Element — element index in the dictionary.

Description

The IsAnyChildSelected method checks if child objects of the element with the Element index are included to the selection, and if so, this method returns True.

Example

Sub Main;
    Var
    MB: IMetabase;
    Dimen: IDimInstance;
    Selection: IDimSelection;
    s: String;
Begin
    MB:=MetabaseClass.Active;
    Dimen:=MB.ItemById("D_TO").Open(NullAs IDimInstance;
    Selection:=Dimen.CreateSelection;
    Selection.SelectElement(11,True);
    Selection.SelectElement(30,True);
    Selection.SelectElement(42,True);
    Selection.SelectElement(56,True);
    If Selection.IsAnyChildSelected(20Then
        s:="Selected";
    Else
        s:="It is not selected";
    End If;
End Sub Main;

After executing the example the "s" variable contains Selected, if child objects of the element with index 20 are included into selection.

See also:

IDimSelection