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: 

Is it possible to export an assembly via API?

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
michelmarroche
902 Views, 4 Replies

Is it possible to export an assembly via API?

I am working on a couple of scripts to download and upload projects from cloud to local.

 

I have already managed to download the projects with their structure and upload them again while maintaining their structure.

 

Now I am trying to export the designs that have assemblies, I can only do it manually from Export, and this creates a local ".f3z" file .. but I can't find how to do this from within a script ..

 

Will it be possible?

 

Thank you !

4 REPLIES 4
Message 2 of 5
kandennti
in reply to: michelmarroche

Hi @michelmarroche .

 

I found a way to export in the same way as the GUI.

    app.executeTextCommand(u'data.fileExport f3z')

https://github.com/kantoku-code/Fusion360_Small_Tools_for_Developers/blob/master/TextCommands/TextCo... 

 

It takes a lot of time because it is the same as GUI.

Message 3 of 5
michelmarroche
in reply to: kandennti

Hi @kandennti thank you very much !

 

I will try it!

 

If it takes a while but allows the assemblies to be properly backed up, it will work!

 

 

Message 4 of 5
kandennti
in reply to: michelmarroche

@michelmarroche .

 

I didn't notice it when I wrote it, but I received a lot of emails ...

Message 5 of 5
ryansmith_
in reply to: kandennti

Thanks for this post @kandennti and your post on Fusion360_Small_Tools_for_Developers/TextCommands/TextCommands_txt_Ver2_0_8176.txt at master · kanto....

 

I'm trying to reliably export f3z files that require cloud translation. The following works in a python script to set the location but doesn't allow for name changes. 

 

            textCommand = f'data.fileExport f3z "{output_folder_path}"'
            app.executeTextCommand(textCommand)
 
I was able to get a new name and location using the neu_server.export in the Text Command window but not in a python script.
 
neu_server.export(r'C:\Users\<username>\OneDrive\Fusion 360 Data\test.f3z')
 
Do you know a way to run this from python?
 
I'm also finding that renaming a Document is not allowed and renaming a dataFile by dataFile.name = newName works for the dataFile but doesn't reliably update the Document.name, which is the name used in exports. Have you found any way to work through this?
 

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report