To integrate DelftShell functionality in ArcMap the following steps were performed:

  • Created a plugin class "DelftShellExtension" to extend ArcMap functionality
  • Subdived DelftShell into two components: DelftShell and DelftShell.Loader

Three classes implementing IDockableWindowDef were created to display projectexplorer, messagewindow and propertygrid

DelftShellExtension.cs was created public from DelftShell.cs to be implement some logic specific to ArcMap, but most methods remain.

DelftShellToolbar class wass created to show buttons to open each of the three windows separately

To show each of the dockable windows three classes where hard-coded. This needs to be refactored!

Challenges

Two options where tried (without success upto now) to avoid hard-coding each command and each dockable window
-one of the options was to create assemblies at runtime for IToolWindow implementations in DelftShell in and adding them to the registry
-the other option was to have one class for IToolWindow implementations and registering it several times to com with different GUID

the second option failed because ArcMap doesnot show the GUID of the dockable window it instantiates based on the registry info but it shows the GUID of mscorii.dll instead. So if ArcMap instantiates three dockable windows they all have the same GUID.

GUID- identifier used in COM to register classes for COM interoperability

Demo

ArcMap automatically detects the plugin from the registry, so no coding in VBA was needed to extend ArcMap. The resulting implementation is shown below:

  • No labels