hylndr

Can you programmatically add a "Add-In" button to a context menu?

Discussion created by hylndr on Dec 15, 2011
Latest reply on Dec 16, 2011 by hylndr
Howdy All,
     I have created an ArcGIS 10.0 Add-In, that when it is installed for the first time I would like to add the Button in it to the "featurelayer" context menu programmatically...  When I was developing it, the first time I ran it in debug mode I add to manually add the button to the feature layer context menu.  Is there a way that this can be done programmatically once and only once?  I have several hundred users that I would not like to have to explain to ALL of them how to do this step themselves the first time they install and run it...  

For that matter, I would also like to programmatically add it to a toolbar as well, but I figure, if I can figure out how to add to the context menu, the toolbar should be pretty similar...

I have added to the project an AddIns extension, that I have a couple lines of code in the OnStartup sub to set some variables up before the button/form is used for the first time.  I figure if need be, something could go in here to see if the button is in the context menu or not and add it if it is not already there...  Any thoughts???

Current Environment:
ArcMap 10.0 Service Pack 3, ArcInfo license level
ArcObjects SDK, Service Pack 1
Visual Studio 2010 Professional, Service Pack 1
VB.Net
Working on an ArcMap Add-In.

Thanks in advance,
Kevin Orcutt

Outcomes