VectorScript Examples

VectorScript

 

 

Basic

 

 

Create New Layer

How to create a new layer in a document.

download

Create New Class

How to create a new class in a document.

download

Absolute - Relative Modes

Compares drawing using absolute and relative modes.

download

Set Class of Object

How to set the class of an object to the active class.

download

Set Object to Class Attributes

How to set an object to use the attributes of its assigned class.

download

Set Color of Selected Object

How to pick and object onscreen and set its color.

download

Create Record Format

How to create a new record format in a document

download

 

 

 

Intermediate

 

 

Set Color of Selected Objects

How to set the color of a selection set of objects

download

Attach Record to Object

How to attach a record to an existing object and load it with data based on the object type.

download

Bump

Bump is an alternate nudge command created completely with VectorScript.

download

 

 

 

Advanced

 

 

Catalog Symbols

Shows how to process through the document symbol list using recursion.

download

Catalog Symbols II

Shows how to process through the document symbol list using the ForEachObjectInList() function.

download

Custom Dialogs

 

 

Revise Layer Link

An example menu command using a custom dialog which allows the user to update the referenced layer of a layer link.

download

Align Selected Objects

An example menu command which uses a custom dialog with an image pane control with external image resources and lets the user align selected objects.

download

Create Light

An example menu command which creates a new light object. The dialog interface for the command uses a wide variety of custom dialog controls.

download

Pick Hatch Dialog

An example script that displays an image popup allowing the user to choose from among the hatches in the active document. Use the "Run VectorScript..." command under the Scripts item in the Organize menu to load this script.

download

Plug-in Objects

 

 

Point Object

An example point custom object.

download

Linear Object

An example linear custom object.

download

Rectangular Object

An example rectangular custom object.

download

2-D Path Object

An example 2-D path object. (VectorWorks 9 or higher)

download

Superellipse

A simple plug-in object example which draws a superellipse based on selected parameter values.

download