Creating custom tool/attribute scripts

Command

Path

Custom Tool/Attribute

Tools

Custom tool/attribute scripts record the current attribute and file settings of a selected object in a script format for later use. If a tool is active, the recorded attributes and settings can be combined with the tool to allow a specific set of attributes, such as fill style or pen color, to be reactivated for use with the tool. For example, a dashed line type and red pen foreground color can be saved with the Line tool in a script for drawing red dashed lines. No scripting knowledge is necessary.

This command picks up the attributes of a single selected object. If no objects are selected when the command is run, the document defaults are used for the script.

To create a custom tool/attribute script:

Select the command.

The Custom Tools dialog box opens.

Select which attributes should be saved in the script.

The saved attributes are used when the script is executed and can be modified or reset.

Click to show/hide the parameters.Click to show/hide the parameters.

Parameter

Description

All

Each group of attributes has this option, to make it easy to quickly select and deselect attributes.

Checked box: All attributes in the group are selected; click to deselect all attributes in the group.

Empty box: No attributes in the group are selected; click to select all attributes in the group.

Box displays a square or dash: One or more attributes in the group are not selected; click to select all attributes in the group.

Fill Attributes

Saves fill foreground and background colors, styles (pattern, hatch, gradient, or image fill), and textures

Pen Attributes

Saves pen foreground and background colors, styles (solid, pattern, or line type), and line thicknesses

Line End Marker

Saves the style and size of line end markers

Text Attributes

Saves text attributes including font, size, font style, alignment, and spacing

Other Attributes

Saves other attributes such as classes, layers, symbols, tools, and snapping settings (snapping parameter settings, as well as which snapping tools are active)

If Tool is not selected, the attributes and settings are applied as the document default when the script is run.

When prompted, name the script palette (if none exists) or select an existing script palette, and name the attribute settings script.

The script displays in a script palette, and can be run as described in Running scripts.

Using scripts

Running scripts

 

Was this page helpful?