I currently have a main application which in an add-in. In this main application is a dockable window with multiple checkboxes which turn on various layers. I have other add-ins that the user can load that are basically toolbars.
Depending on what is launched on the tool bar(s) the checkboxes can be turned on or off on the dockable window on the main application (add-in).
In order to do this I have a reference set in the tool bar add-ins to the .dll of the main add-in. All this works fine, using the functions on the toolbars I can turn on and off the layers on the map by setting the checkboxes on the dockable window of the main application from the different add-ins.
My question is: Is there a different way to do the same thing (link-reference-communicate) between add-ins without needing to set a reference as it is currently done?
Thank you for your time. Dale,
I am one step closer. I am able to access the Dockable Window in my ArcMap application which contains the checkbox that I am wanting to turn on or off from my Add-in, without having to have a reference to the ArcMap application (Add-in)..
While I can now show, reset the caption, move the Dockable Window, I cannot get ahold of the controls within the Dockable Window (textboxes, checkboxes, etc.)
So any ideas as to how I can do this? Or how can I access a public variable within the ArcMap application from the Add-in? I am trying to approach this a different way as well.
Below is the code that is in my Add-in to hook/connect/link to the main application which contains the Dockable Window (FeaturesDockWin is the name of the Dockable Window).
Dim docWinMgr As IDockableWindowManager = CType(My.ArcMap.Application, IDockableWindowManager)
Dim attributeWindow As IDockableWindow
Dim attributeWindowID As UID = New UIDClass()
attributeWindowID.Value = ("MC_GIS10_FeaturesDockWin")
attributeWindow = docWinMgr.GetDockableWindow(attributeWindowID)
The trick to all this is the attributeWindowID.Value which took me a while to figure out. It is the DockableWindow id from the main ArcMap Application I am trying to hook/connect/link to.
Go to the application you are trying to hook/connect/link to (must have a Dockable Window), go to Config.esriaddinx.
There you will find the Dockable Window id, once I plugged it in, onto the next problem!!!!
<DockableWindow id="MC_GIS10_FeaturesDockWin" class="FeaturesDockWin+AddinImpl" caption="Features" image="Images\FeaturesDockWin.png">
<InitialPlacement height="498" width="194" state="pinned" position="left" />