Message 1 of 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm having some issues with the Document OnSave Event when developing multiple Add-Ins.
At first I created an Add-In and implemented the OnSave event with success (Add-In_1).
But now, I'm developing a second Add-In to also implement the OnSave event in that as well (Add-In_2).
These are completely separate Add-Ins, but I've copied over for example the code handling the OnSave event.
When debugging Add-In_2 and stepping into the code as I save the document, I've discovered that this is happening:
- Add-In_1 trigger its OnSave event with kBefore eventTiming.
- Add-In_2 trigger its OnSave event with kBefore eventTiming.
- Inventor displays the Save Dialouge, I press OK to continue. (so far so good)
- Add-In_1 trigger its OnSave event with kBefore eventTiming again. (why?)
- Add-In_2 trigger its OnSave event with kBefore eventTiming again. (why?)
- Add-In_1 trigger its OnSave event with kAfter eventTiming.
- Add-In_2 trigger its OnSave event with kAfter eventTiming.
- Add-In_1 trigger its OnSave event with kAfter eventTiming again.
- Add-In_2 trigger its OnSave event with kAfter eventTiming again.
So, I'm looking for some advice and best practice of how to handle this and avoid the duplicate events firing, I'm clearly doing something wrong. Any feedback is appreciated, thanks.
Solved! Go to Solution.