[Editor’s note: This new script allows multiple files to be placed into Adobe Illustrator at once. Illustrator’s native place command can only handle 1 single file at once. This script was commissioned by Eric at Nutshell Communications, Inc.]
This script will allow you to (import) place multiple files as separate named layers from a designated folder to a new Illustrator document. The files are all placed at once, you don’t get to control individual placement (but of course you can modify location after the script runs). Script should work with CS2, CS3, and CS4, both Mac and Windows.
To install new scripts you need to:
- Download either the IMAGES version (eg, JPG, GIF, TIF, etc) or the EPS version.
- Quit Illustrator
- Copy the script file into the Illustrator application folder’s “Presets†» “Scripts†subfolder. If you are in CS4 this will be the application folder’s “Presets†» “en_US” » “Scripts†subfolder (transpose “en_US” with your local language string).
- 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
Usage
- The script asks for a folder to be selected by the user in a normal file open dialog.
- All loose files are examined and if they match EPS file type then they are placed (nested folders not examined).
- It is easy to limit this to EPS or add other file types (see below)
- The files are placed into the middle of the document (or registered to a 9-point page location).
- Each placed file gets its own layer, the layer name matches the placed file’s name.
- The file is not auto-saved. You do that manually.
Placement Options
Line 7 controls the placement of the imagesinto the document. These are 9-point registration of ul, ml, ll, um, mm, lm, ur, mr, lr.
var placement9pointAlignment = “mm”;
Adding More File Types
Line 33 controls which file extensions are supported:
if( (fName.indexOf(“.eps”) == -1) ) {
You can easily expand the file types supported as shown in the commented out line in 34:
//if( (fName.indexOf(“.eps”) == -1) && (fName.indexOf(“.gif”) == -1) && (fName.indexOf(“.jpg”) == -1) && (fName.indexOf(“.png”) == -1) && (fName.indexOf(“.bmp”) == -1) && (fName.indexOf(“.tif”) == -1) && (fName.indexOf(“.psd”) == -1)) {
To allow more file types, use the formatting and grammar as in line 34.