Is it possible to access the functions or properties of an ArcGIS Add-in project (C#) from another Add-in at run time?

I have a custom ArcMap application extension installed and I would like an Add-in command from a different project to check if the extension is enabled and if so read/write a property from it.

I have seen this help doc but it only talks about communication within the same project. Add-in coding patterns

So far the only way I know how to do this is to add a reference for the extension's dll to the other Add-in projects. I'd like to set it up to be independent though.

I'm using ArcGIS 10.4.1 and VS 2015 if it matters.

  • 1
    You don't really need to communicate in this fashion to check an extension; it is indeed possible to 'talk' between addins that share the same IApplication. To check if an extension is enabled use AoInitializeClass with the method IsExtensionCheckedOut (example gis.stackexchange.com/questions/20977/…) – Michael Stimson Feb 19 '18 at 21:42
  • Thanks I can use the IExtensionManager to see if the extension is enabled. Is there any way to access its public properties? – Rich Wawrzonek Feb 19 '18 at 22:13
  • You could have a look at the code snippet resources.arcgis.com/en/help/arcobjects-net/componenthelp/… if you're using IExtensionManager rather than AoInitialize to find your extensions. – Michael Stimson Feb 19 '18 at 22:55
  • Yes I can get the extension from IExtensionManager as an IExtension reference. If the extension has a public property or method can I call that and return the value? I want to use the extension to coordinate data between two different Add-ins. – Rich Wawrzonek Feb 19 '18 at 23:59
  • is edndoc.esri.com/arcobjects/9.2/CPP_VB6_VBA_VCPP_Doc/shared/… what you're after? It documents the GUIDs of several popular extensions. – Michael Stimson Feb 20 '18 at 0:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.