How create action for all layers in Illustrator file

I have an Illustrator document with hundreds of vector images (each a color variation of a single image). Each vector image is on a separate layer. I have created an action to resize and export (save as png). Currently I have to apply this action manually for each layer. If 100 layers => click Action play button 100 times. Is there a way to create a batch action to perform an action on all layers in an Illustrator document with one click?

Answer

I’m answering my own question, since I found a solution.

Based on Scott’s suggestion (in a comment to the question) to use scripting, I found a script that helps export each layer as a raster image. The script, called “Batch Export Unlocked Layers” is written by John Wundes. The script is hundreds of lines and too long to post here but I’ll link to the download here (main site is www.wundes.com, in case of future link rot).

How to use:

  • Download the script and save it.
  • Open from Illustrator: File > Scripts > Other Script > locate file and Open.
  • A dialog generated from the script will open that allows you to specify size, file format and destination directory, as well as file name based on layer name. All unlocked and visible layers will be exported.
  • Click start.

I tested it in Illustrator CS4 and it exported 300 layers in less than a minute.

Attribution
Source : Link , Question Author : Pierre Rymiortz , Answer Author : Pierre Rymiortz

Leave a Comment