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. 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
Marionette, a graphical scripting tool (see Visual scripting with Marionette)
This section discusses scripting, but not the SDK. For detailed developer-oriented documentation related to the SDK, Python, VectorScript, and Marionette, 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 Object Visibility, Custom Selection, Custom Tool/Attribute, and Custom Modification commands provide the ability to automatically create useful scripts by specifying options in a dialog box (no scripting knowledge is needed). If you have scripting knowledge, you can also write your own document scripts. Both types of scripts are saved as resources and stored in script palettes contained within a file. The scripts and script palettes can be created, accessed, exported, imported from another file, renamed, and deleted through the Resource Manager.
You can also create scripts and store them 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. Script developers can create installation scripts of the menus and tools associated with third-party plug-ins and allow insertion of menus/commands and tool sets/tools into the current workspace.