Difference between revisions of "Scripting"

From WireCAD Online Help
Jump to: navigation, search
Line 11: Line 11:
 
Currently there are no menu commands for the scripting engine. You must type the commandline shortcut script in order to launch the tool.
 
Currently there are no menu commands for the scripting engine. You must type the commandline shortcut script in order to launch the tool.
 
[[File:Scripts1.png|thumb|Scripts Form]]
 
[[File:Scripts1.png|thumb|Scripts Form]]
 +
 +
Once launched scripting provides one method Run for you. Through this you have access to the WireCAD Workspace object. The Workspace object provides access to most of the WireCAD object model. From Workspace you can access the ActiveDrawing, DataAccess, MainForm and many other objects.
 +
 +
The editor provides hints as you to type you don't necessarily have to know the object model. You can explore by typing ws. and follow the hints.
 +
 +
== Example Scripts ==
 +
Example scripts can be found in the shared WireCAD6\Scripts folder. The location of this folder is different depending on OS. See this [[Knowledge_Base#Q:_Where_Does_WireCAD_Put_Files.3F|page]] for more info.

Revision as of 08:42, 1 October 2011

Command Line Shortcut: script

User Permissions Level: various
Product Level: XLT, PRO, ENT
Scripting allows an easy way to access the WireCAD SDK object model to perform custom actions


What you Need to Know

You will need a little knowledge of the c# programming language but the editor will provide hints

Usage

Currently there are no menu commands for the scripting engine. You must type the commandline shortcut script in order to launch the tool.

Scripts Form

Once launched scripting provides one method Run for you. Through this you have access to the WireCAD Workspace object. The Workspace object provides access to most of the WireCAD object model. From Workspace you can access the ActiveDrawing, DataAccess, MainForm and many other objects.

The editor provides hints as you to type you don't necessarily have to know the object model. You can explore by typing ws. and follow the hints.

Example Scripts

Example scripts can be found in the shared WireCAD6\Scripts folder. The location of this folder is different depending on OS. See this page for more info.