Using Scripts

Scripting is one method of customizing the Vectorworks program to suit a wide range of design needs. Scripts can create anything from simple tools that assist with the most tedious drafting tasks, to sophisticated solutions for demanding designs. Three scripting options in the Vectorworks program include:

    The Software Developer’s Kit (SDK) in the C++ language

    Python® programming language

    VectorScript™, a lightweight Pascal-like programming language

This section discusses scripting, but not the SDK. For detailed developer-oriented documentation related to the SDK, Python, and VectorScript, please navigate to developer.vectorworks.net.

The Vectorworks program provides several methods for creating, managing, and executing scripts. While scripting languages provide a rich set of development tools when creating scripts from scratch, there are also several commands that allow you to create scripts without direct knowledge of programming. The most basic of these methods is to select the File > Export > Export Script command. The command creates a script from the file’s contents and saves it as a Python or VectorScript file in the designated location. Select the File > Import > Import Script command to execute the script from a saved file in a new, automatically created design layer.

The Custom Selection, Custom Tool/Attribute, and Custom Modification commands provide the ability to create useful scripts directly.

In addition to these automated methods of creating scripts, the traditional method for creating and saving scripts (and a feature of Vectorworks since its original release as MiniCad), is to write document scripts, which are saved as script resources and are stored in script palettes contained within a file. Both document scripts and script palettes can be created, accessed, exported, imported from another file, renamed, and deleted through the Resource Browser.

Scripts can also be created and stored in plug-ins. Plug-ins are a component of a workspace, and can be accessed from any file. Scripts in plug-ins can be used as menu items, tools, or parametric objects. Plug-ins are created and maintained using the Plug-in Manager, which is accessed by selecting Tools > Plug-ins > Plug-in Manager.

Finally, scripts can be purchased from third-party vendors and installed.

~~~~~~~~~~~~~~~~~~~~~~~~~

Creating Custom Selection Scripts

Creating Custom Tool/Attribute Scripts

Creating Custom Modification Scripts

Creating and Editing Script Palettes and Scripts

Running Scripts

Scripted Plug-ins

Creating Custom Path Objects

Customizing Size Settings for Plug-in Objects

The VectorScript Debugger

 

vectorworks.net