Detecting ArcGis Application Closure

790
2
06-18-2013 07:35 AM
Highlighted
New Contributor III
I would like to detect the closure of ArcGIS.

I'm using VB.Net, ArcGIS 10.1.

I've succussfully wired an event for the CloseDocument Event, and it does fire when ArcGIS closes, but it also fires when a new document is created (without ArcGIS being closed), which isn't what I need.

I haven't been able to identify an event for Application closure.


Any help appreciated.

Regards

Chris
Reply
0 Kudos
2 Replies
Highlighted
Regular Contributor III
If you create an extension then you can implement IExtension.Shutdown.  Extensions are only unloaded when the application closes.
Reply
0 Kudos
Highlighted
New Contributor III
Thanks Neil

I am using an Extension so this solution is an easy one to implement, and a quick test has given me good results.

Annoyingly, I had looked at this solution and discounted it (for a reason that I can't remember now).


Thanks again.

Chris
Reply
0 Kudos