The Mindjet Labs

Hands-on MindManager
Welcome to The Mindjet Labs Sign in | Join | Help
in Search

The Organizational Irritant

A Working MindManager Sample Add-in

There are a number of reasons why writing a MindManager Add-in can be useful.  Most obvious is the desire for intimate control over user interaction, and the ability to manipulate some external system using map data as a guide.

Creating an Add-in begins with the IDTExtensibility2 interface.  MindManager loosely follows the same Add-In model seen in Microsoft Office and the Visual Studio 2005 IDE.  Like those applications, MindManager 7, given the correct registry settings, will load a COM object and obtain an IDTExtensibility interface to that instance.  There are 5 methods on this interface.  These have an event handler feel to them, used to manage the lifecycle of the Add-in component.

But like most extension efforts, the depth of functionality in an Add-in depends in part on both the MindManager object model and the developer's familiarity with the application itself.  MindManager knowledge is built by using the application, but the object model is what it is.  One way to deal with it is to learn what it can do.

In this spirit, I wrote a MindManager Add-in Sample.  In one form or another, this code has been on my drive for months.  This has been a form of sandbox, allowing experimentation with MindManager without cluttering up other projects. The release of MindManager 7 kicked this sample into a corner for a while, but I eventually revisited the subject.  After a number of "gee, I should finish this" moments, I finally cleaned it up and added enough documentation to make it intelligable.

This sample factors common behaviors into a utility DLL and implements a sample add-in using these utilities.  I tried to exercise the range of UI integration mechanisms available.  The list below illustrates the current crop.  Remember, most of this is illustrative in nature. 

  • Ribbon Tabs, Groups - add one Tab to the Fluent UI ribbon, and place a group on that tab
  • Menu Commands - add one sample menu item to each stock MindManager menu. Note how the MindManger 7 host handles the deprecated menu identifiers.
  • CommandBar Buttons - add a sample button to each command bar made available by the MindManager host. Note how the MindManger 7 host handles the deprecated command bar identifiers.
  • Add-in Defined Command Bar - add a custom CommandBar with a button and a menu to the MindManager user interface. Note how the MindManger 7 host handles the deprecated command bar UI widget.
  • Add-in Defined Menu - create a menu instance and cache it for later tear-down.
  • Event Handlers - create SaveEventHandler and ViewChangeEventHandler instances to catch specific events fired by the host.
  • Sample Task Pane - load an icon for the taskpane, then create a sample TaskPane instance
  • Sample Option Pane - create an OptionPane instance.
  • Sample Business Type - register a URI and create an associated MmxSampleBusinessType instance for it.
  • Sample Control Strip - load an Icon, register the MmxSampleControlStrip type with MindManager, create a reference to the DocumentStatsCommand, and populate a context menu for the ControlStrip.

 

For example, this sample adds a menu item to all the available MindManager dynamic menus, including those deprecated in MindManager 7.  The main UI behavior I was unable to demonstrate was the popup KeyTips in the Ribbon.  While the ribbon tab created by the add-in responds to the ALT+S key, the individual menu items in the group are not available through the keyboard.  I don't know why.

Since the Downloads section of this site doesn't have a distinct Add-in section, I attached the sample to this blog post as a .ZIP archive.  This archive file includes the Add-in VS.Net 2005 solution containing three projects: MmxSample, Mmx Utility, and an installation.  The source code for the project is included, as is a .CHM documentation file generated from the XML  tags using the Microsoft SandCastle tools.  The most excellent SandCastle Help File Builder was very useful in generating the docs.  

The simplest thing to do with this sample is to download the zip file, expand it to a working directory, and open the solution with VS.Net 2005. The help file for the sample, Mm7Sample.chm, can be found in the MmxSample\collateral\Help folder.  As time, energy and reader intrest permits, I may write additional posts discussing the details. 

In any event, here's something I wish I had when I first looked at the MindManager object model - a working MindManager Add-in sample.

 

 

 

Published Friday, November 23, 2007 4:04 PM by dethomas
Attachment(s): MIndManager7AddInSample.zip

Comments

No Comments
Anonymous comments are disabled

About dethomas

So who is this dethomas guy anyway? Here's a capsule bullet point summary:
  • Midwestern white boy, ex-busboy, stock-clerk, grinder, welder and English major, now laboring lo these many years in the fields of awkward stone that characterize software development.
  • 20+ years of software development experience - CPM/Apple/Unix/DOS during the Reagan years, embedded systems before the term was common, Windows development since the first Clinton administration.
  • Mechanical engineering undergrad degree, showing that early success in thermodynamics is not necessarily a good thing. But the Apollo workstations running UNIX were cool.
  • Engineering master's degree with a control systems emphasis, demonstrating that publishing in IEEE Transactions is cool, but not necessarily a good thing.
  • Employed by an industrial electronics company as a principal engineer. Distinguished by several innovation awards, several software patents, and for once having used the word "Byzantine" in a requirements specification.
  • Learned FORTRAN on punch cards, learned Pascal, BASIC and APL to do numerical analysis in several fields of engineering, learned assembly, C, C++ and Java to write software for several embedded systems, custom applications and shrink-wrapped software products.
  • Has considerable exposure to a variety of technologies, including networking, databases, graphics libraries, linear programming, compilers, non-linear control systems, real-time operating systems, fuzzy logic, neural networks, UML, .Net, XML, OPC, WSI, WSDL and WWF. (On that last one, WWF, dethomas is convinced he did time in high school with a guy who went on to success in the Mexican pro wrestling circuit under the name "el Queso Grande.")
  • Wide exposure to Microsoft Windows products and operating system editions as both user and developer, relative indifference to web technology and the dot com boom until the dust settled.
  • Has a cable modem, but no cable TV service. Which is a philosophical statement of sorts. Television is bad for you, the Internet is not. Or at least not yet.