Need some coding help, macro included
Posted: Mon May 23, 2022 4:44 am
The goal is to select an edge and the macro will highlight the associated face. I made a simple macro so if a Body object is selected in the tree it will exit, simple enough. Start the macro and select an edge.
I am attaching a file but it is just a cylinder.
I'm having a problem here:
I can't figure out what AddSelection needs to work correctly.
Thank you
I am attaching a file but it is just a cylinder.
I'm having a problem here:
Code: Select all
for fac in faces:
if fac.Surface.isPlanar():
print("Found planar face",fac)
Gui.Selection.addSelection(self.doc.Name,'Body',fac)
I can't figure out what AddSelection needs to work correctly.
Thank you