Creating Scripts

To create a script:

  1. From the Resource Browser, select New Resource > Script from the Resources menu.

  2. The Assign Name dialog box opens. Enter the name of the script and click OK.

    Newly created scripts are located by default in the active script palette (the palette which is open and active, or which is open in the Resource Browser). If multiple script palettes exist, but are not currently open, the Select Script Palette dialog box opens to select a location for the script. Select the palette to add the script to and click Add. If no script palette exists in the file, a new script palette must be created to contain the script.

  3. 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.

  4. Scripts00005.png 

  5. When the script is complete, click OK to save it.

Scripts can be edited, renamed, deleted, exported, imported, moved, and executed from the Resource Browser.

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

Editing Scripts

Running Scripts

Using the Resource Browser

Creating a Script Palette

Using Scripts

 

vectorworks.net