I'm developing add-in using ArcObjects for .NET for ArcMap. Where can I place code on add-in startup and shutdown? Right now I'm using extension within add-in for that purpose. But I want to get rid of extension. Is it possible?
I think using application events is wrong way. I need exactly points in time where add-in initialized and uninitialized. I can use extension for that purpose. But it's complexity without any benefits for user (user should remember that turning extension on in Extension dialog is required to use add-in).
Have you seen this page, they are wiring up application events within an addin.
In the past I've set the onDemand property to False for a button which forces the addin button to load and you can run code in the onstartup() but this does not deal with shutdown.
Toolbar with buttons. But it doesn't matter. I need to do some actions when add-in starts and finishes. And I want to do these actions without extension.
What sort of AddIn are you creating? A button, a toolbar with buttons, a panel...?
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.