Intercept "Save" Dialog Box Using Python Script

Intercept "Save" Dialog Box Using Python Script

isocam
Collaborator Collaborator
404 Views
1 Reply
Message 1 of 2

Intercept "Save" Dialog Box Using Python Script

isocam
Collaborator
Collaborator

Can anybody help?

 

Is it possible, using a Python Script, to intercept the "Save" dialog box?

 

I am looking into the possibility of automatically populating the part number without manually typing the part number.

 

Many thanks in advance!

 

Darren

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

BrianEkins
Mentor
Mentor

You can use the DocumentSaving event to do this.  I did notice the documentation for this event is not correct but it doesn't affect what you want to do with it.  The documentation says you can cancel the save but you can't. That was intended in the original design but it hasn't been implemented so the documentation needs to be updated.

 

I've attached a test add-in I used to see if this would work. For testing, each time you save it changes the part number to be the current date and time.

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