DeselectChildren(Element: Integer; Recursive: Boolean);
Element — index of dictionary element, which child elements should be removed from selection.
Recursive - parameter that determines whether child elements at all lower levels are removed from selection. If parameter value is True, all lower level elements are deselected; if the parameter is False, only direct child elements positioned one level lower than the Element element are deselected.
The DeselectChildren method removes child elements from selection.
Sub Main;
Var
MB: IMetabase;
Dimen: IDimInstance;
Selection: IDimSelection;
Begin
MB:=MetabaseClass.Active;
Dimen:=MB.ItemById("D_TO").Open(Null) As IDimInstance;
Selection:=Dimen.CreateSelection;
Selection.SelectAll;
Selection.DeselectChildren(11,True);
End Sub Main;
After executing the example all child elements of the eleventh dictionary element are removed from selection.
See also: