The following code correctly tells me the name of a selected sketch line and that it has two vertex objects as SubShapes. However, I can't figure out how to get the names of those vertex objects.
Code: Select all
Sel = Gui.Selection.getSelectionEx()[0]
print("Sel SubElementNames:", Sel.SubElementNames[0])
print("Sel SubObjects:", Sel.SubObjects[0])
print("Sel SubShapes:", Sel.SubObjects[0].SubShapes)
12:39:52 Sel SubElementNames: Edge3
12:39:52 Sel SubObjects: <Edge object at 0x55be6e4147a0>
12:39:52 Sel SubShapes: [<Vertex object at 0x55be7222d390>, <Vertex object at 0x55be72547810>]
I know from hovering over each vertex that their names are: vertex5 and vertex6
Ultimately, what I'd like to do is deselect the line and select the vertices instead.
Can anyone shed any light on how to get those names and create a selection with them?
Thanks in advance!
-Chris