Add Facets/Vertices to Selection Set via script?
![Faux2D](https://secure.gravatar.com/avatar/5e6f1ddc083354ca80efff14ee515551?&r=pg&s=100&d=https%3A%2F%2Fvanillicon.com%2F5e6f1ddc083354ca80efff14ee515551_100.png)
I'm wondering what the command is to add a specific facet (or vertex) to a Selection Set?
I know addSelectedFacetsToGroup("[group name]") works only if I have previously selected geometry in the viewport. I want a way where I bypass that and add certain facets to a group without having to select them in the viewport. A workaround would be to make a selection of a facet via script but I don't know how to do that either. I tried the getFacet() command but when used with the addSelectedFacetsToGroup() it does nothing.
Comments
These work for me:
(Similar for Facet, Edge, Vertex)
Edited 2021-08-27 to correct missing ')'s in ### Notes, and incorrect 'function' declarations.
Many thanks! Very useful!