Automatically save a file as a "Step" File using Python scripting

Automatically save a file as a "Step" File using Python scripting

isocam
Collaborator Collaborator
635 Views
1 Reply
Message 1 of 2

Automatically save a file as a "Step" File using Python scripting

isocam
Collaborator
Collaborator

Can anybody help?

 

I have a single Fusion 360 project made up of three separate components.

 

One of these components will always be called "Sprocket"

 

Is it possible, using a Fusion 360 python script, to automatically export the "Sprocket" as a "Step" file to the "C:\Windows\Temp" folder?

 

Many thanks in advance!!!

 

Darren

0 Likes
636 Views
1 Reply
Reply (1)
Message 2 of 2

PinRudolf
Advocate
Advocate

I've never tried, but... i think that shouldn't be a problem.

 

The application object has an event called documentSaved; that will call your add-in every time the document is saved.

When that is called you could check if the design has a component with the name == "Sprocket".

Using the exportmanager you should be able to export as step to the specified location. The export functionality is specifically designed to export component objects.

 

It will probably cost someone the best part of an evening to piece it together into a functioning add-in, though.

 

0 Likes