Setting Plug-in Properties

 
 
 

The XSILoadPlugin function gets a PluginRegistrar or PluginRegistrar object as an argument. Through this object, you can set plug-in properties such as SIObject.Name or SIObject::PutName(), PluginRegistrar.Author or PluginRegistrar::PutAuthor(), and SIObject.Help or PluginRegistrar::PutHelp().

// JScript
function XSILoadPlugin(in_pluginRegistrar)
{
	in_pluginRegistrar.Name = "My Commands";
	
	// Contact info
	in_pluginRegistrar.Author = "The Plugin Factory";
	in_pluginRegistrar.Email = "support@example.com";
	in_pluginRegistrar.URL = "http://www.example.com/support";
	
	// Plug-in version information
	in_pluginRegistrar.Major = 1;
	in_pluginRegistrar.Minor = 0;
	
	// Comma-separated list of user-defined categories
	in_pluginRegistrar.Categories = "Example, Command, Menu";
	
	// The plug-in help file is located in the Help subfolder inside the installation folder
	in_pluginRegistrar.Help = XSIUtils.BuildPath(in_reg.OriginPath, "Help", "FooUserGuide.htm");
	
	// Register plug-in items ...
	
	return true;
}

All these plug-in details are displayed in the Plug-in Manager. You can right-click a plug-in in the Plug-in tree and click Properties to open the Plug-in Details dialog. You can click the Email, URL, and Help properties to open the links.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License