DeselectSiblings(Element: Integer);
Element — element index in the dictionary.
The DeselectSiblings method removes elements at the same level with the Element element from the selection.
Elements are removed within their parent element.
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.DeselectSiblings(11);
End Sub Main;
After executing the example all elements at the same level with the 11th element are removed from the Selection selection.
See also: