Hiya all!
I'm new to the Fusion 360 api, but I was hoping to change some of the default properties on the Export dialog (specifically the "Save to my computer..." path).
It seems like I should be able to catch the export command somewhere, and then modify the command inputs, but I haven't worked out a way to do that (I tried adding my own CommandStarting handler, but couldn't find a way to get/modify inputs in there).
Any suggestions would be helpful!
(Fallback is to create my own export dialog, but I'd rather not...)
Cheers,
Geoff
Solved! Go to Solution.
Solved by marshaltu. Go to Solution.
Hello,
Unfortunately there is no API to support to customize the export dialog. Instead you can create export dialog by yourself and make use of ExportManager to do export.
For example: the following codes show how to show save file dialog and export file as f3d.
import adsk.core, adsk.fusion, traceback def run(context): ui = None try: app = adsk.core.Application.get() ui = app.userInterface filedlg = ui.createFileDialog() filedlg.initialDirectory = '/Users/tum/Downloads/' filedlg.filter = '*.f3d' if filedlg.showSave() == adsk.core.DialogResults.DialogOK: design = adsk.fusion.Design.cast(app.activeProduct) option = design.exportManager.createFusionArchiveExportOptions(filedlg.filename, design.rootComponent) design.exportManager.execute(option) except: if ui: ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
Thanks,
Marshal