kelso cartography

buyinteractive print software scripts plugins custom blog contact

Scripts for automating Adobe Illustrator

Also check out my Plugins page for Adobe Illustrator automation.

Last update: 17 February 2009

I work for the Washington Post newspaper as a cartographer creating maps for daily publication. The two popular desktop graphics applications for mapping are Macromedia Freehand and Adode Illustrator. With Adobe's purchase of the former last year (primarily for Macromedia's Flash interactive content platform) Freehand has been end-of-lifed in favor of Illustrator. Perhaps some of Freehand's more powerful features will make it into CS4, but until then I've hacked together some scripts to ease the transition. I also link to a few other useful scripts and plugins for cartographers below.


If you would like to stay informed of changes to any of my scripts or be alerted if I release new scripts:

How did you hear about my scripts?
(eg, Search engine, friend, cartotalk, etc.)
What scripts are most useful?
(eg, Find and Replace Graphics)
Have a script idea?

Feb. 17, 2009

New versions of:

  1. Calendar Wizard v5 (blog post) (download 100k)
    Over 25 new featues, updates, and bug fixes.
    When downloading the script, right click on the "download" link above and choose "Save as..."
    Then follow the installation steps below.


April 3, 2008

New versions of:

  1. Find and Replace Graphics (blog post including demo movie) (download 13k)
  2. Make Point Type (blog post including demo movie) (download 10k)
  3. Fit Text Frame to Content (blog post) (download 3k)


Sept. 28, 2007

Flash-based GUI interface for Scripts in Illustrator CS3
Beta demonstration of three of John's scripts for registering point type without moving the text. Can be expanded to any script.

Install both the JSX and the SWF into your Scripts folder and run the JSX. It will launch the SWF as a panel / palette in Illustrator (with the buttons as shown at left). Click one of the buttons, the correct script runs. Mac support beta. Windows support alpha.

Feedback appreciated! Email me at


Table Of Contents

  • Nathaniel's Scripts
    • Calendar Wizard - UPDATE
    • Find And Replace Graphics - UPDATE
    • Make Point Type - UPDATE
    • Make Area Type
    • Detatch Type from Path
    • Delete Empty Layers
    • Rename Layers
    • Select Paths with less than X points
    • Fit Text Box to Text Content - UPDATE
  • John's Scripts
    • Toggle text registration point without moving the text
    • Divide Text Frame
    • Join Text Frame
    • Zoom View to Selected Object
  • Wolfgang's Scripts
    • Close open path
    • Reverse path direction
  • Illustrator Plugins (assorted authors)
    • Swiss Institute of Cartography - Mapping specific plugins
    • Rick Johnson Graffix – Concatenate - Join paths ala Freehand
    • Phantasm CS - Color Adjustment, Rich Black to Pure Black, Remove White Overprints
    • Worker 72a - White overprint, collect for output, zoom to selected
    • Hot Door CadTools
    • Hot Door MultiPage
    • Point Tweeker
    • Extreme Path
    • Better Handles
    • MaPublisher - Importing raw GIS data into Illustrator, psuedo GIS operations and database

What Wolfgang Reszel says you should know about scripts:

  • Only Illustrator 10 and above can be automated with scripts;
  • There are three types of scripting-languages for Illustrator and the other Adobe products:
    • JavaScript (Mac and PC),
    • AppleScript (Mac only),
    • VisualBasic (PC only); and
  • To install new scripts you have to:
    • Quit Illustrator
    • Copy the files into the Illustrator application folder's "Presets" » "Scripts" subfolder
    • After restarting Illustrator you can find the scripts in the menu "File" » "Scripts";
    • TIP: You can create subfolders in the scripts folder to organize your scripts

Plugins are a 4th type of extended feature set but are platform specific (Mac/PC) and sometimes only work for a specific version of Illustrator. They are installed in your Illustrator > Plugins folder.

Calendar Wizard - Version 5
Download (100k) View blog post.
Last updated 17 Feb. 2009.
Choose "Save as..." when right clicking on the "download" link above. Follow the installation steps above.

Create five types of calendars in Illustrator including page, wall, tabloid, compact, and mini business card sizes. Multilingual support is provided for English, Spanish, French, German, Chinese, and Japanese.

Text is live and includes character styles and tab stops for customization. Date box grid, and art placeholders are included on some templates. Tooltips help explain the options and the script will automatically create a document if one is not open. Over 25 new features, updates, and bug fixes in version 5. Screenshots and native Illustrator template files included at the blog post.



Find and Replace Graphics

Imitates the functionality found in Freehand's Find & Replace by Path shape panel. Move your "replace" path object to the top of the stacking order (Object > Arrange > Bring to Front). Select all the "find" objects. The topmost object is copied to the location of the other selected objects. There are two varients that either center the new object in the old object's position or scale it to "transform to fit original". They are really the same script with a toggled flag setting.

This script is especially useful to turn generic path objects (say from the GIS) into proper Illustrator "Symbols" or to swap out one set of generic path objects for another.

This script has been updated to version 2 (below). Version 1 is still available and available.

Find&ReplaceGraphics is based on John's Copy To Multiple Objects.

a a a
Original objects (must be selected) findAndReplaceGraphic_centered findAndReplaceGraphic_transformToFit


Make Point Type

Illustrator is now able to import Freehand files but it does so by putting the imported text into annoying text boxes that do not auto expand to fit new content.

This script works on horizontal and rotated text boxes turning them into point type. The script also works with type on a path. The script ignores non-text objects in the selection (you can "select all" and run the script without problem).

Make Area Type does the reverse.

Version 3 available below. Original point type script here.


Varient: DetachTextFromPath
A work in progress...

Varient: UpdateLayerNames


Selecting paths with LESS than X points

Useful for selecting sliver park or water polygons and generalizing them out of existance.
If you want MORE than X points do the selection to that number and then invert the selection.



Fit to Text Box to Text Content

FitToTextContent (version 2)
Varient: FitToTextContentWidth


John Wundes' Javascripts for Illustrator

Toggle text registration point without moving the text

left center right
Align Text to LEFT

Local Copy: alignTextFieldLeft
Varient: alignTextFieldCenter Varient: alignTextFieldRight

Divide Text Frame
Local Copy: divideTextFrame


Join Text Frame
Local Copy: joinTextFrames

Zoom and Center Selection
Local Copy: ZoomAndCenterSelection


Wolfgang Reszel's Javascripts for Illustrator

Includes an exhaustive crosslisting to additional scripts for Illustrator.

Close Paths

Will close all filled paths if no selection or just the selected paths. A dialog reports how many were modified. Useful if the GIS does not close the polygons and/or you want to have an inset stroke in Illustrator (which requires closed paths).
Local Copy: wr-closeallpaths

Reverse Path Direction

Useful for switching the arrowhead location on lines.
Local Copy: wr-reversepathdirection