Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Changing Camera View from Perspective to Orthographic Using API?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
knightsAHN63
212 Views, 2 Replies

Changing Camera View from Perspective to Orthographic Using API?

Hello all! Has anyone written any scripts or add-ins that change the camera view type? We are developing an add-in and hoping to automatically change our user's view to ensure that it is only 'Orthographic' instead of defaulting to perspective. Any advice is greatly appreciated! Attached is quick screenshot of what we are hoping to do with API.

2 REPLIES 2
Message 2 of 3
kandennti
in reply to: knightsAHN63

Hi @knightsAHN63 .

 

You can switch between them using the Camera.cameraType property.

https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-c1d597b4-69c2-4b91-ab39-659f23f7f61d 

 

The camera is retrieved from the Viewport.camera property, but be aware that you need to reassign it to get a copy.

https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-2005e69c-36cd-45a2-bb3d-8cf5b968ab9a 

 

The zoom position is quite different from when the cameraType is switched in the GUI.
I've used it here. I couldn't figure out the formula.

https://github.com/kantoku-code/Fusion360_PerspectiveAngleController 

 

Message 3 of 3
knightsAHN63
in reply to: kandennti

Thank you so much, got it working! Appreciate your help.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report