Show Properties Box
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Can anybody help?
I have the following Python script that works great if the Fusion 360 document is a single part (not an assembly).
import adsk.core, adsk.fusion, traceback
def run(context):
ui = None
try:
app = adsk.core.Application.get()
ui = app.userInterface
des = app.activeProduct
root = des.rootComponent
# select brepbody
sels = ui.activeSelections
sels.add(root.bRepBodies[0])
# show props - textcommands
app.executeTextCommand(u'Commands.Start FusionPropertiesCommand')
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
Does anybody know how to modify the above so that it works on both a single part and an assembly?
Many thanks in advance!
Darren