macro scripts tool scripts

Tool scripts and macro scripts:

• are executed from an icon button on a View window toolbar or from a menu;
• can access features of the current view, such as layers, extents, projection, selected elements, zoom factor, scale, and styles;
• can operate on objects in the current view or objects containing the same area;
• can add a newly-created layer to the view;
• can start an external program and provide it with data derived from the current view.

To create, choose Macro Scripts or Tool Scripts from the View window's Options menu.

A macro script is run from the macro's icon in the View window. It does not allow graphical interaction like a tool script, but can be set up with a drop-down menu that provides program options.

Pressing a tool script icon invokes a drawing tool and/or a dialog window used to interact with the spatial data in the view window. For example, the user could outline an area or select particular elements to be processed.

Several sample scripts have been prepared and are made available to illustrate scripting techniques and give you models to copy and adapt for your own needs.  You can work from existing scripts, or create new scripts by using the helpful Tool Script Templates or Macro Script Setup.