Document scripts can be created, saved, and executed within a Vectorworks file. Scripts must be nested in script palette folders. Use the Resource Manager to manage script palettes folders as well as individual document scripts.
To create a script:
From the Resource Manager, click New Resource, select Script, and then click Create. Alternatively, from the Resource Manager, select Scripts from the list of resource types on the tool bar, and click New Script.
Scripts must be placed in a script palette folder. Do one of the following:
● If script palettes exist in the file, the Select Script Palette dialog box opens; select the palette to add the script to and click Select, or click New Palette to create a palette.
● If no script palette exists, a new palette is created automatically; enter a name for a new palette.
The Assign Name dialog box opens. Enter the name of the script.
The Script Editor opens to begin a script editing session. The editor provides a basic authoring environment for script development and maintenance. Its features allow you to create, edit, and compile scripts, browse available functions, view errors, and perform other tasks associated with creating scripts. Select the script language for the script: Python Script or VectorScript. Scripts are limited to 32,001 characters. For detailed developer-oriented documentation related to Python and VectorScript, please navigate to developer.vectorworks.net.
Click to show/hide the parameters.
Scripts can be edited, renamed, deleted, exported, imported, moved, and executed from the Resource Manager.
To edit an existing script:
From the Resource Manager, right-click on the resource, and select Edit from the context menu. Scripts are nested in script palette folders.
The Script Editor opens, displaying the script source code. See Creating and Editing Script Palettes and Scripts for a description of the Script Editor.
Command |
Path |
Encrypt Script |
Tools > Plug-ins |
Encrypt a script to prevent editing.
To encrypt a script file:
Select the command.
The Choose Script File dialog box opens.
Locate and select the script file to encrypt.
Click Open.
The Save Encrypted VectorScript Code Document dialog box opens.
Enter a new name for the script, and then select the location for saving the file.
Click Save.
The script is saved in an encrypted format.
~~~~~~~~~~~~~~~~~~~~~~~~~