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, with a filename having an extension 'dll'. To register a .NET UI plugin component, open a command window by going to the Start menu, typing "C", and clicking the Command Prompt app. Change your directory (using the cd command) 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 in the subfolder C:\WINDOWS\Microsoft.NET\Framework\. The actual folder depends on your version of the .NET Framework installed on your computer.

XML manifest file

The Ansys Orbit Determination Tool Kit (ODTK) application uses an XML manifest file to discover and load plugins at runtime. Using either Visual Studio or a text editor, create a new XML file. Ansys recommends naming the XML file with the same name as your plugin (MySampleUiPlugin.xml). Below is an example (not actual) 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="GNSS Constellation UI Plugin (Examples)"
                TypeName="GNSSConstellationPlugin.GNSSConstellationPlugin"
                AssemblyName="GNSSConstellationPlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
                CodeBase="C:\Users\DeveloperKit\CodeSamples\Extend\Ui.Plugins\CSharp\GNSSConstellationPlugin\GNSSConstellationPlugin\bin\Debug">
           </NETUiPlugin>
	</Category>
   </CategoryRegistry>
</AGIRegistry>

You must save this XML file in <Install_Dir>\Plugins.

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 startup will not take effect until the next time the application starts. The ODTK application looks for XML plugin registration files in <Install_Dir>\Plugins.

XML registration files located in <Install_Dir>\Plugins are available for every user.

Related topics: