For configuration reasons, I want to delay the load of my addin extension until ArcMap 10.2 has finished.
If there a property, flag, listener etc I can get a hook to do a check if arcmap is done?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
Yes there is (in fact you have a choice of a property or an event to hook into):
It is suggested that UI changes from Add-ins only occur after application initialization, so this is just the hook you want. You may want to delay even further, but this is the soonest you want to load up your customizations.
Also, elements of add-in UI must be configured as onDemand or not. You can achieve greater flexibility by setting the onDemand XML parameter for each UI element to "false" then managing each UI enable within the Startup of the add-in.
Here's why: Say that your Add-in has a toolbar with command tools which operate on a selection. If the Add-in initializes and automatically enables these command tools, then the user can pick on them and they will start. If there is no selection, then the tools may error out if they do not error-check for a selection.
--When the Add-in initializes, the extension within the Add-in starts up. Within the startup constructor the extension can check for a selection and enable/disable the Add-in UI commands based on the result. It can also hook into the 'Selection.Changed" event and manage the command enable/disable throughout the Add-in lifetime.
Good luck programming your ESRI Add-in.