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: 

Is there a way to open a Fusion 360 drawing file from a Python Script?

Message 1 of 2
444 Views, 1 Reply

Is there a way to open a Fusion 360 drawing file from a Python Script?

I have a need to automate some tasks I do in FUSION360 in that I would like to execute a msdos batch file that may have 30-50 drawing file names in my Fusion360 projects folder, and have it call a python script which will open the fusion360 drawing, change a couple of the user parameter values and then export the drawing as stl to a network folder.


I found script that has example of how to change the user parameters and export as stl however I can't figure out how to get a python script to open fusion360 with a name of drawing file.   


Is there anyway to do this with the Fusion360 API?   Anyone know of any examples in Python?



Message 2 of 2



app = adsk.core.Application.get()
ui  = app.userInterface

theData =

dataProjectIndex = 0
i = 0
while i < theData.dataProjects.count:
  if (theData.dataProjects.item(i).name == 'PROJECT NAME'):
    j = 0
    while j < theData.dataProjects.item(i).rootFolder.dataFolders.count:
      if (theData.dataProjects.item(i).rootFolder.dataFolders.item(j).name == 'FOLDER NAME'):
      k = 0
      while k < theData.dataProjects.item(i).rootFolder.dataFolders.item(j).dataFiles.count:
      k += 1
  j += 1
i += 1



This may get you started. This is part of an Add-In that I use to open all files within a certain folder in a certain project.


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