DeselectElement(Element: Integer; Recursive: Boolean);
Element. The index of dictionary element which must be removed from selection.
Recursive. Parameter determining whether child elements will be removed from the selection. If the parameter is set to True, the element and all its child elements at all levels are deselected, if the parameter is set to False, only the specified element is deselected.
The DeselectElement method removes element with the Element index 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.DeselectElement(11,True);
End Sub Main;
After executing the example the 11th element and all its child elements are removed from selection.
See also: