Navigation:  Customizing WireCAD (SDK) >

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.

Applies To:

XLT PRO

Related Settings:

None

 

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:\program files\WireCAD\bin\plugins folder.

 

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.

 

pluginmgr1

 

WPI File Editor


wpi

Name

Self explanatory

Description

Author

Website

Copyright

Button Info

Tool Tip

Tool tip text

Caption

The button caption

Button Site

What is the base location of the button

Button Path

Button path is the path in the menu tree of the button. Start with Main Menu and work your way down. If the menu tree does not exist it will be created. Use the & key to create accelerators. If you are using an existing path be sure to include accelerators or you will end up creating a new menu item.

Button Bitmap

16x16 bitmap

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 path of your dll. If no path we will search the WireCAD\bin directory

Namespace Dot Class

SomeNameSpace.MyClass 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.