How to get screenshot of scene by API

How to get screenshot of scene by API

Anonymous
Not applicable
1,986 Views
4 Replies
Message 1 of 5

How to get screenshot of scene by API

Anonymous
Not applicable

I would like to make an add-in for Fusion 360 which should save screenshot of scene/workplace periodically. The period of time will be defined by user. It will help to track time and build timeline of work. The saved images (screenshots) could be used to make a video and publish somewhere on web.

 

So is there any api method to get image of scene or any way to do it?

 

 

0 Likes
Accepted solutions (1)
1,987 Views
4 Replies
Replies (4)
Message 2 of 5

frankzhang
Alumni
Alumni
You may want to try the tool called screencast, check out here:

http://www.autodesk.com/products/screencast/overview
0 Likes
Message 3 of 5

liujac
Alumni
Alumni
Accepted solution

Hi,

 

You may use Viewport.saveAsImageFile.

 

 

import adsk.core, adsk.fusion, adsk.cam, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface
        
        app.activeViewport.saveAsImageFile("c:/box.jpg", 400, 300);

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

 

Thanks,

Jack

 

Message 4 of 5

Anonymous
Not applicable

Thank you for reply, but I don't need to make screencast but I want make a some kind timetracker and timeline of modeling for freelancers/employees and employers.

In the market there are many time trackers software but they all require to start, pause, suspend and stop when you work, the add-in I want to make should give a free of these actions, you just work and the plugin will calculate work time and even more it will make a sequences/video how the modeling process was done, for example every 2 seconds it will save screenshots if there is activity and it can tell how many real time spend on modeling and you can watch it as a video (outside of the fusion of course).

0 Likes
Message 5 of 5

Anonymous
Not applicable

Thank you! I will cehck it!

0 Likes