Hi @thatgalnatalie,
first of all: welcome to the forums .
It is only possible to select nodes that are inside the current edit context. This, unfortunately, doesn’t include the parent node.
Cf. Edit Context rules · Adobe XD Plugin Reference
The edit context is the scope within which your plugin is allowed to make edits or set the selection. It is a “neighborhood” of scenegraph nodes around the user’s current selection.
It is therefore, for now, not possible to achieve this.
Other topics that cover this:
- Select (single) nodes outside the edit context programmatically
- Selecting parent node returns Error: Cannot select node outside the current edit context's scope - #3 by Velara
I hope this helps (although it’s probably not the answer you were hoping for) ,
Happy coding,
Pablo