Message 1 of 5
Regression in saving view as image file using API on Mac
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
There is a regression in the API functionality to save a view to an image file on Mac. I know this was working 4 or 5 months ago. It is still working correctly on Windows but does not work on Mac. The function saveAsImageFile reports that it was successful, but no image file is created. Here's a small sample script that can be used to reproduce the problem. You'll need to change the filename to match your username.
import adsk.core, adsk.fusion, adsk.cam, traceback def run(context): try: app = adsk.core.Application.get() ui = app.userInterface filename = '/Users/admin/Test.png' success = app.activeViewport.saveAsImageFile(filename, 0, 0) ui.messageBox(str(success)) except: if ui: ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
Reply
Reply