Mode 2 ScriptCode

  1. Set the DynamicCode property to ScriptCode. The Script Complier window shows up.
  2. Choose C# and copy the code below to the Script Compiler window.

    //Get the total number of plugins in the application program
    Int32 pluginCount = SuperMap.Desktop.Application.ActiveApplication.PluginManager.Count;
//Traverse all plugins and output plugins information in the Output Window
for (Int32 index = 0; index < pluginCount; index++)
{
    //Get the class object that defines the plugin

    Plugin plugin = SuperMap.Desktop.Application.ActiveApplication.PluginManager[index];
        
    //Get the info object of the plugin

    PluginInfo pluginInfo = plugin.PluginInfo;
        
    //Get the name of the plugin

    String pluginName = pluginInfo.Name;

    //Get the full path of the assembly where the plugin is located

    String pluginAssemble = pluginInfo.AssemblyName;

    //Output the plugin name and the assembly to which the plugin belongs in the Output Window

    SuperMap.Desktop.Application.ActiveApplication.Output.Output("Plugin Name: " + pluginName + "\r\n" + "Assembly: " + pluginAssemble);
}
  3. Click Build. When succeeded, click Save. 

Close the Script Compiler window.

![](img/ScriptCode1.png)  

  4. Click OK to save the settings.