Navigation:  Reference > Ribbon Tabs and Dialogs > Dialogs > Plugins Dialogs >

Script Editor/Runner

Previous pageReturn to chapter overviewNext page

dlg_plugins_script


Explanation

Often times there are operations that you find yourself repeating endlessly. Scripts are a good way to automate those processes. There are many example scripts to browse through and see how they work.

 

NOTE: Scripts that run in WireCAD MUST have the following method signature or they will not execute:

 

using System;

using System.Data;

using System.Text;

using System.Windows.Forms;

using System.Diagnostics;

using System.Reflection;

using WireCAD;

using WireCAD.Interfaces;

//You may add additional using statements as needed but the listed ones are the minimum.

 

public class Script

{

 public static void Run(Workspace ws)

 {

         //do your stuff here

 

 }

}

 

 

Possible Uses

1.Title block filling
2.New Drawing creation
3.Database cleanup

 

Usages

1.Launch the tool.
2.File>Open an example script. (c:\users\public\WireCAD\WireCADx\Scripts\).
3.Read the comments (they are the ones proceeded by //).
4.Tweak the script to suit your needs.
5.Run it by clicking the [RUN] button snip_plugins_script_run
6.Fix any compiler errors. Lather, rinse, repeat.

 

Dialog Options

Item

Description

New

Creates a new script with the necessary signature.

Open

Opens a .cs file to run.

Comment

Comment out your selection. Useful for hiding code from the compiler without deleting it.

Un Comment

Un comment your selection

Indent


Outdent


Run

If the Error List is empty then Do It. If if fails it will tell you why in the Compiler Output window.

Window On Top

Make this the topmost window always

Error List

Design time scripting errors

Compiler Output

Run time compiler and script execution errors.