Run Script "ON SAVE"

Run Script "ON SAVE"

isocam
Collaborator Collaborator
385 Views
1 Reply
Message 1 of 2

Run Script "ON SAVE"

isocam
Collaborator
Collaborator

Can anybody help?

 

I need, for testing purposes only, a Python script that runs every time the user presses the save button.

 

Therefore,

If the open document is an "Assembly" I need a message box saying "Assembly"

If the open document is a "Part" I need a message box saying "Part"

If the open document is a "Drawing" I need a message box saying "Drawing"

+

Many thanks in advance!!

 

Darren

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

prainsberry
Autodesk
Autodesk

Hey I think this should work for you.  Run this as an "add-in". 

 

You can see I check the document type. Then check whether the root component has children.  

 

 



Patrick Rainsberry
Developer Advocate, Fusion 360
0 Likes