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: 

File Conversion from native(.prt) to step file using python

Message 1 of 9
1220 Views, 8 Replies

File Conversion from native(.prt) to step file using python

I want to convert the  native cad file (.prt ) to step file using fusion 360  in python.In fusion API, i couldnot find import for the .prt file but have only few files. Could  you guide me how can I translate the .prt file  programtically using python with the help cloud API?


Many thanks

Message 2 of 9
in reply to: s.chand6RXFT

Hi @s.chand6RXFT .


There are not many formats that can be directly converted by the Fusion360 API. 


Therefore, you must upload your data to the cloud, open the document, and then export it.


I have not tried this, but @BrianEkins  has created a sample. 


This year, the Application.dataFileComplete event was added, so it may be a little easier to tackle. 


However, I think it would be difficult to get the timing of when the document is finished opening and ready for export.



Message 3 of 9
in reply to: kandennti

Thanks for your support. I have tried  the code mentioned in the link

But.  I am new in fusion360  and i uploaded file in the file . But , i am not familiar with  how to export  to step  file after translation  completion in the cloud.



could you guide me after this steps for the export work. It would be highly appreciated if you provide some code snippets.

Many Thanks

Message 4 of 9

What kind of Fusion 360 license do you have?
The Personal license doesn't allow to open .PRT filetypes, which is required to export it then to other format.
Check this first, before you invest some more time in the script development.

Message 5 of 9
in reply to: s.chand6RXFT

@s.chand6RXFT .


I have created a sample add-in and have attached it.

Since we do not have the SLDPRT file at hand, we borrowed it from here. 


When the add-in is executed, it performs the following processes
・Upload file
・Open document
・Export with Step file
・Close document
・Delete from data panel
・Closing the add-in


The Step file is created in the same folder as the SLDPRT file with the same file name.

Message 6 of 9
in reply to: kandennti

Thanks alot. i will do .

I want to run the script from Pycharm IDE and  do the translation for my application. I want to do auotomatic process for passing the  public key  without opening fusion 360 api each time.How can i do the automatic process.Please guide me .


Many Thanks

Message 7 of 9
in reply to: s.chand6RXFT

@s.chand6RXFT .


I do not know how to do that.

You should consider installing conversion software.

Message 8 of 9
in reply to: kandennti

Due to the  automatic process require my program, i choose the model derivative api  for file translation prt file to step file. I am following the following tutorial.

I can get token,create the bucket and upload the file in the cloud. But, when i tried to do translation work i am getting the error.

my source file is  827-9999-906.prt which i download from interne
The code is as shown below:




But i am getting error :




Does Modelderivative Api doesnot support step derivative format??

how can i achieve the step file from prt file ?  Waiting for your reply.


Many Thanks

Message 9 of 9
in reply to: s.chand6RXFT

I think you'll have better luck asking your question on the Forge forum on Stack Overflow.


What you're trying to do now has nothing to do with the Fusion API.

Brian Ekins
Inventor and Fusion 360 API Expert

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