How to distinguish between different UI flows which result in a document save?

How to distinguish between different UI flows which result in a document save?

scottmoyse
Mentor Mentor
365 Views
2 Replies
Message 1 of 3

How to distinguish between different UI flows which result in a document save?

scottmoyse
Mentor
Mentor

Does anyone have any idea how I could figure out if the users has triggered a save via doc/app closing vs using the Save button?

2020-04-27_10-38-41.jpg

 

The document events fire in this order documentSaving > documentSaved > documentClosing > documentClosed.

 

If they were documentClosing >  documentSaving > documentSaved > documentClosed then I could easily catch the scenario.

 

I've tried checking the sender property on the document event object and the application event object, but the only time a Save specific ID appears is the first time a design is saved... and ONLY when using the Save button (which is kind of weird). 


Scott Moyse
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


EESignature


RevOps Strategy Manager at Toolpath. New Zealand based.

Co-founder of the Grumpy Sloth full aluminium billet mechanical keyboard project

0 Likes
366 Views
2 Replies
Replies (2)
Message 2 of 3

BrianEkins
Mentor
Mentor

I don't believe there is a way to know why the save is happening.  I agree that the event order you gave would seem more logical.  Sometimes there are reasons internally for returning events in a certain order, but I don't know if that's the case here.  

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes
Message 3 of 3

scottmoyse
Mentor
Mentor
Ok thanks

Kind Regards
Scott Moyse
Manufacturing Technical Specialist Autodesk Expert Elite
P: +64 9 302 4028 M: +64 21 055 7775
scott.m@cadpro.co.nz

CADPRO Systems Ltd
Auckland - 527b Rosebank Road, Avondale Auckland
Christchurch - Unit 3, Kendal Avenue, Burnside
New Zealand

Scott Moyse
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


EESignature


RevOps Strategy Manager at Toolpath. New Zealand based.

Co-founder of the Grumpy Sloth full aluminium billet mechanical keyboard project

0 Likes