Add-Ins: Concepts and Interfaces

What is an "Add-in"?

An "add-in" is a software component that MSBNx can load at run-time that knows how to monitor and participate in user actions. In other words, it is an external component that extends the capability of MSBNx.

Using Add-ins

To create or remove an add-in, just bring up the Add-in Management dialog and check the add-in you wish to activate or deactivate.

You do not need to know any programming details to use an add-in; you merely need to know its purpose and usage.

Creating Add-ins

To create an add-in, you must be able to program in a language that supports the ActiveX automation programming model, such as Microsoft Visual Basic© 6.0.

Each add-in is an ActiveX component (typically a dynamic-link library) that implements the special add-in interface defined by MSBNx and understands the other interfaces MSBNx provides to allow access to its internal data.

See Creating an Add-in for more details.

Persistence of Add-ins

Information about the add-ins applied to a model are stored in the model's disk file as part of the dynamic properties. This means that when the model is reopened, all previously activated add-ins will be recreated and attached to the diagram window.

Basic Mechanics

Add-in Operations

Each open diagram window in MSBNX may have one or more associated add-ins. Each add-in can:

Add-in Interfaces

MSBNx creates a new instance of an add-in using the standard ActiveX CreateInstance function (known as CreateObject in Visual Basic). It then requests a reference to the object's IDocAddin interface.

The add-in object is then given a reference to an interface called DocIface, which represents the diagram document to which it is attached.

Implementation Warnings

The interfaces documented here are subject to change without warning. If you implement an add-in, you should be prepared to regenerate the add-in whenever you or anyone else using your add-in installs a new version of MSBNx. This may be necessary if there are changes to the MSBNx interfaces or their unique identifiers (GUIDs).