Set differen viewport for saveAsImageFile method

Set differen viewport for saveAsImageFile method

NDeis
Explorer Explorer
505 Views
2 Replies
Message 1 of 3

Set differen viewport for saveAsImageFile method

NDeis
Explorer
Explorer

Is there a way to change the "viewport" reference of the "app.activeViewport.saveAsImageFile" method?


Essentially want to create thumbnail's of a bunch of views triggered by another event. The code works perfectly for activeViewport but I can't find an api reference for viewport control that is not tied to the active view.

 

I've seen some reference to camera control but that seems to be for modifying the activeViewport still.

506 Views
2 Replies
Replies (2)
Message 2 of 3

BrianEkins
Mentor
Mentor

Unfortunately, only the active viewport is accessible.  Fusion originally only supported a single viewport and when the functionality was added to Fusion it didn't get exposed through the API.  It hasn't been considered too high of a priority because I don't think multiple viewports are used that much in Fusion.  Just to make sure we're talking about the same thing, below is a picture where multiple viewports are enabled.

 

Viewports.png

 

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes
Message 3 of 3

NDeis
Explorer
Explorer

Thanks for the reply, yes I do believe we are talking about the same thing when referencing viewports but it's causing me to think that I may be looking in the wrong direction. For generating image/thumbnail exports of the model though are we limited to the activeViewport? This being the same view port that the UI/user is using?

 

I guess I'm looking to see if there is a secondary "camera" entity that the script has control of that is not visible to the user as some other modeling programs have available.

0 Likes