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: 

"Open" & "Save" Silently Using A Fusion 360 Python Script

4 REPLIES 4
Reply
Message 1 of 5
isocam
291 Views, 4 Replies

"Open" & "Save" Silently Using A Fusion 360 Python Script

Can anybody help???

 

Using a Fusion 360 API script, is it possible to "Save" or "Open" a document silently?

 

"Save"

I want to be able to save a "Assembly", "Part", or "Drawing" silently.

 

"Open"

I want to be able to "Open" a Fusion 360 "Part" and get its attributes.

 

Many thanks in advance!

 

Darren

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

Hi @isocam .

 

Saving is done by the save or saveAs method of the Document Object.

https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-54a08742-92b2-4831-b9e6-4161b89f6e1e 

 

Open is the open method of Documents Object.

https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-29580a5e-995a-489e-9ea0-9753c1e11ac0 

 

The Application Object has documentOpened and documentSaved events for documents, but the events are not fired when the document itself is saved or opened, but when the command itself is completed.

https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-7209c4c7-bc58-4388-9e20-036410459094 

 

This makes it very difficult to know when to get the attributes after the document is opened.

 

 

Here is an example of monitoring the timing of f2d opening using a text command.

https://forums.autodesk.com/t5/fusion-360-api-and-scripts/drawing-pdf-export-how-to-access-the-new-e... 

 

Please respond occasionally.

 

Message 3 of 5
BrianEkins
in reply to: isocam

I think you need to define what you mean by "silently".

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
Message 4 of 5
isocam
in reply to: isocam

By "Silently" I mean that you do not physically see anything happening. It is all done in the background.

Message 5 of 5
BrianEkins
in reply to: isocam

Many of us are used to using a program to start an application or connect to an instance that's already running and then interacting with the application using it's API. And doing this all invisibly. This type of functionality is natively supported by an application that uses COM (Microsoft's Component Object Model). Fusion does NOT use COM and doesn't support access to the API from an external process, so what you described is not currently possible.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com

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