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.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to take pictures of the different faces of a cube on Fusion 360 (using an Add-in or a Script)

Message 1 of 4
146 Views, 3 Replies

How to take pictures of the different faces of a cube on Fusion 360 (using an Add-in or a Script)

I am really new with Fusion 360 and I would like to create an Add-in or a Script that would allow me to take pictures of the different faces of a 3D object and save them. I've made something that seems like it could work, but Visual studio keep telling me that I can't use the command AppearanceCapture and AppearanceCaptureOptions. While later I would like to make a program that could work with any 3D shape, for now I simply want to be able to get pictures of the different faces of a cube (baby steps).


Could any one of you help me with my problem or give me idea on how I could do this?

Linked to this post is the code I've made.


Thank you in advance!

Message 2 of 4
in reply to: 201933238



I wrote the following function to capture images of different views (you can call it from script's run() function):


def save_view_images():
    WIDTH = 400
    HEIGHT = 300

    app = adsk.core.Application.get()
    des: adsk.fusion.Design = adsk.fusion.Design.cast(app.activeProduct)

    for nv in des.namedViews:
        app.activeViewport.saveAsImageFile(f'/99tmp/views/{}.png', WIDTH, HEIGHT)



It reads the custom views you have defined in the current design:



And save an image of every view. This is the result:



I hope this could help you out.



Jorge Jaramillo

Software Engineer


Message 3 of 4
in reply to: Jorge_Jaramillo



Thank you very much for helping me with this matter. The solution you gave me is miles beyond what I was originally thinking of doing.


I added your solution to a new fusion 360 script however it doesn't seem to be working (the fault is most likely that I forgot to add something).


Sans titre.png



When I try to run the script I am met with this :

Sans titre2.png

Again, I am certain the problem is linked to the fact that I forgot something. Could you help me understand what I am missing please.



A student who is interested in learning python



Message 4 of 4
in reply to: 201933238

Hi @201933238 ,


The Design.namedViews property is new in September-2023 updated version:



Make sure you have the latest Fusion 360 update and it will run without errors.

I'm running on this version:  app.version='2.0.17244'



Jorge Jaramillo

Software Engineer


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