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
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"> <CategoryRegistry> <Category Name = "UiPlugins"> <NETUiPlugin DisplayName="Rectangular Sensor UI Plugin (Examples)" TypeName="RectangularSensorPlugin.RectangularSensorPlugin" AssemblyName="RectangularSensorPlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" CodeBase="C:\ProgramData\DeveloperKit\CodeSamples\Extend\Ui.Plugins\CSharp\RectangularSensorPlugin\RectangularSensorPlugin\bin\Debug"> </NETUiPlugin> </Category> </CategoryRegistry> </AGIRegistry>
This XML file must be saved in one of these three locations, where STK will see it:
- STK User Config Plugins directory (usually Documents\STK 13 \Config\Plugins)
- STK Install folder (usually <Install_Dir>\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.
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 STK 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:
- <Install_Dir>\Plugins.
- Windows All Users Application area:
- Windows Configuration area:
<STK all users area>\Plugins
<STK all users area>\Config
XML registration files located in the following folders are available for every user:
- <Install_Dir>\Plugins
- <STK all users area>\Plugins
XML registration files located in <STK user area>\Config\Plugins will be available only for that user.
Related Topics:
- Step By Step Tutorial
- Installing and Deploying Plugins
- Ui Plugins Library Reference
- Ui Plugins Technology