Registering Your Plugin

<< Click to Display Table of Contents >>

Navigation:  Writing Plugins >

Registering Your Plugin

Previous pageReturn to chapter overview

Menu: Plugins>Plugin Manager[Add/Edit PI Info]

Default command line shortcut: none


Assuming your plugin requires user input to launch it, ie. it does not respond to an event. You will want to register your command with the application.

WireCAD uses an information file (wpi - WireCAD Plugin Info) to describe a command and to tell the application how to execute the command.

WireCAD looks for these files in the c:\users\public\documents\WireCAD\WireCAD9\plugins\Active Plugins

Commands can be executed directly from the Commandline or from a button on a menu bar.

In order to register your command you must, at minimum, set up the Commandline arguments. Toolbar buttons are optional. To edit a wpi file use the editor.

 

 

plugin_mgr_zoom33

wpi_editor_v9_zoom37

Controls

Name, Description, Author, Website, Copyright - Self explanatory.

 

Button Info

 

Tool Tip - Text displayed when mouse hovers over the button.

Caption - The button caption.

Ribbon Page - Select a page or create your own.

Ribbon Page Group - Select a page group or create your own.

Button Bitmap - bitmap image. 16x16 for a small button 32x32 for a large one.

 

Command Line and Assembly Info

 

Long Name - The display name of your command.

Short Name - The shortcut.

Alt - Shorter less descriptive.

Assembly Name - The name and fully qualified path of your dll. If no path we will search the \WireCADx\bin directory.

Namespace Dot Class - YourNameSpace.YourClass where your function is located.

Static Method Name - The static void method name of your function. This must have the proper signature as follows:

 

 public static void YourFunctionName(WorkSpace ws)

 {

 

         .....

 

 }

 

Using the above example the Static Method Name would be: YourFunctionName

 

NOTE: if you use the WireCAD Plugin template a static method with the proper signature will be created for you. You will need to rename it to be something meaningful.