IsAnyChildSelected(Element: Integer): Boolean;
Element — element index in the dictionary.
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.
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.CreateSelection;
Selection.SelectElement(11,True);
Selection.SelectElement(30,True);
Selection.SelectElement(42,True);
Selection.SelectElement(56,True);
If Selection.IsAnyChildSelected(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 child objects of the element with index 20 are included into selection.
See also: