NET Managed (UI) Plugins

A .NET UI plugin component relies on a particular format of an xml manifest file for registration.

Compiled Plugins

Compiled components are contained in a dynamic link library, whose filename has an extension 'dll'. To register a .NET UI plugin component, create a command window (under the Start menu, hit "Run ...", type 'Command' and hit OK). Change your directory (using cd) to that of the file. At the command prompt, type 'regasm /codebase YOUR_UIPLUGINNAME'. For example:

regasm /codebase YOUR_UIPLUGINNAME.dll

Note: Your system may not recognize the regasm command. In that case, you will need to specify the full filepath to RegAsm.exe. The file itself is found in a sub-folder of C:\WINDOWS\Microsoft.NET\Framework\. The actual folder depends on your version of the .NET Framework installed on your machine.

XML Manifest File

STK uses an XML manifest file to discover and load plugins at run-time. Using either Visual Studio or a text editor, create a new XML file. AGI recommends naming the XML file with the same name as your plugin (MySampleUiPlugin.xml). Below are examples of the required format for .NET UI plugins.

.NET UI Plugin Manifest

<?xml version = "1.0"?>
<AGIRegistry version = "1.0">
    <Category Name = "UiPlugins">
         DisplayName="Rectangular Sensor UI Plugin (Examples)"
         AssemblyName="RectangularSensorPlugin, Version=, Culture=neutral, PublicKeyToken=null"

This XML file must be saved in one of these three locations, where STK will see it:

  1. STK User Config Plugins directory (usually My Documents\STK 11\Config\Plugins)

    Plugins registered here will be available only to the single user with access to this My Documents folder. Usually does not require administrative privileges.

  2. All Users Application folder (C:\ProgramData\AGI\STK 11\Plugins on Windows 7 and Vista, or C:\Documents and Settings\All Users\Application Data\AGI\STK 11\Plugins on Windows XP)

    Plugins registered here will be available to all STK users on this machine. Usually does not require administrative privileges.

  3. STK install directory (usually C:\Program Files (x86)\AGI\STK 11\Plugins)

    Plugins registered here will be available to all STK users on this machine. Usually requires administrative privileges to save/modify files here.

Manifest Location

When the host application starts, it searches for xml files contained in identified folders and registers all plugins declared in each xml file found. Any changes made to these files after start-up will not take effect until the next time the application starts. STK looks at the following folders for xml plugin registration files:

XML registration files located in <STK installation folder>\STK 11\Plugins and <Windows All Users Application area>\AGI\STK 11\Plugins are available for every user; those located in <Windows Configuration area>\Plugins will be available only for that user.

Related Topics:

You may also want to learn more about:

STK 11.2.1 Programming Interface