SUPER-DUPER Update: I’ve completed a 2.5 hour course on how to use the NEW Variable Importer 8.0 script, and it’s available on Lynda.com! Click to check out more info on the Adobe Illustrator Variable Data Lynda.com course!
And now back to our in-progress blog post…
Previously, I wrote up a tutorial for an easier method to use Adobe Illustrator’s Variable Data feature. By easier, I meant easier than the procedure outlined in the official Adobe documentation.
This time, I’m back with an even easier method, if you can believe that. Recently, I was contacted by Vasily Hall, an script/automation expert who has developed a script for Illustrator called Variable Importer.
I go through it fairly quickly in the video above, but read on for a bit more in-depth walkthrough
What Is Variable Importer?
The Variable Importer script enables you to automate many of the previously annoying aspects of the usual methods of importing variable data into Illustrator.
The top issues resolved with the script are:
There are many more little niceties within the script, so let’s go ahead and take a look.
Get The Variable Importer Script
First we have to get the script installed in Illustrator. To do this, first go to the VariableImporter script home on GitHub.
Once you get there, click on “VariableImporter.jsx”, then click the “Raw” button (shown in screenshot above). This will bring up a page that contains the raw code of the script. From here just “Save as…” from your browser to download (don’t just right-click the “VariableImporter.jsx” and save, because that way will introduce errors into the script – make sure to only save the “raw” code).
You’ll see another script there, too called “RenameArtFromText.jsx”. If you’re interested in doing multiple data sets up on a sheet then grab this one, as well.
Now place the file in your Illustrator Scripts folder and restart Illustrator (or choose to load it each time using the Other Script command).
On my Mac, the location of the Scripts folder is:
/Applications/Adobe Illustrator CS6/Presets/en_US/Scripts (yours may also be inside a “en_GB” folder or other if you have a different language installed).
On the Windows installs I had access to the path was
\Program Files\Adobe\Adobe Illustrator CS6\Presets\Scripts
You can see I’m using CS6 here, but I’ve tested it in CS5, CC, and CC2014. Plus, I have it on good authority that it works in CS4, too.
Now, once you’ve restarted Illustrator you’ll find the script listed under File > Scripts.
So now we’ll need to prepare our data source, which is our csv file, in order to have some variables to import.
Set Up Your Data Source Csv.
We’ll revisit the “Super Cards” I did in my last tutorial so we can examine the new process with them.
Checking the screenshot of my csv file you can see it looks pretty average. There’s no special tricks needed, and you can use any software that can generate a csv file. I usually use NeoOffice, a more Mac-like version of the OpenOffice software.
A couple of quick observations about the file
So basically there’s really not much to do here but fill/paste in your information, or clean up the column headers if the csv is provided to you by someone else.
Then it’s time to get into our Illustrator file.
Set up your Illustrator file.
Checking the above screenshot you can see my Super Cards file is back in action.
Everything that I want to be a variable is it’s own separate object. Some things to note here are:
You probably already have your desired file set up, but just make sure to give it the old once-over before you begin.
Run The Variable Importer Script
Ok, time to make the magic happen.
First, go to File > Scripts > VariableImporter then choose your csv file in the window that appears. Once you choose your csv file, you’ll see the below window:
This is the Import Options window, and you’ll see you have quite a few options here (see screenshot).
So once you’ve adjusted all these options to your liking, you just click the “OK” button at the bottom and the import will proceed. If all went well, you’ll get a dialogue pop-up declaring how many records and variable names have been imported.
Check your Records
After this, it will probably look like nothing has changed. This is because Illustrator doesn’t actually select the first record for you, so you have to choose your first record from the Data set dropdown in the Variables palette. Once you choose that first one, the correct information should now be showing in your file. Then you can use the arrows at the top of the Variables palette to quickly cycle through all your sets and make sure they are ok.
At this point all you have to do is export each Data set as it’s own file.
Export all Datasets via action
Now that you have the variables loaded in and working, you’re going to have to output these to separate files at some point. This is accomplished by using an export action. Basically you have to save the file first, record the saving of that file, then play it back so Illustrator can save all the files itself without user input.
If it’s not already open, select “Window > Actions” from the top menu. Select “New Action…” from the right flyout menu, or click the New Action button on the bottom of the Actions palette.
In the window that appears, you can name the action something like “Save EPS” or Save AI” or anything that helps you remember what it does.
Once you click the “Record” button in that window, the action will begin recording. From this point, do a “Save As Copy…”, and then choose your desired format and location. Don’t worry about what you name the file at this point.
It’s important to use “Save As Copy…” because if you simply use “Save As…” then for some reason Illustrator will not save the file extension. This may be fine for some, but the Rips I work with won’t process an image without an extension, so I gotta have it.
Another important note about “Save As Copy…”. In my experience I found you should not change the name of the file when you save it. If you do, then the extension will again be lost, and you’ll have to add it back using Bridge or some other method.
When the file is saved, make sure to click the “Stop” button at the bottom of the Actions palette. You now have a complete action you can use to export all of the datasets. You can delete this file you saved, since you won’t need it anymore.
Use export action in Batch process to export all files.
From here we’ll use the “batch” feature to run the action we just made on every one of the datasets.
To start, open the flyout menu on the Actions palette and choose “Batch…” from all the way at the bottom.
In the window that pops up, make sure your action is chosen in the “Action” dropdown. Set the “Source” to “Data Sets”, and choose the folder you saved to in the “Destination” area .
On the right of the “Destination” area is where I usually set my File Name to use “Data Set name”. You don’t have to use that option, it’s just the one I prefer.
As soon as you click the OK button, Illustrator will begin switching through all the data sets and saving them out according to your action. Depending on the speed of your computer and the number of records this might take several minutes. It will definitely be faster than doing it by hand, though.
At this point you’re essentially finished, you have all your files exported and ready to go. Obviously you should take a quick look at all the files using bridge and make sure no errors jump out at you, but basically it should be all done.
If all you needed were separate files, then mission accomplished. But, if you need to get those files laid out on one big sheet for printing, then you’d have to place them all back into Illustrator and group them by hand. In an upcoming tutorial I’ll talk about placing multiple Data sets up on a page.
Congrats, we just imported variable data – the easy way!
Here’s a few quick links for convenience:
THE WRAP UP
So that’s all for this tutorial. I hope this provides a much easier method for working variable data in Illustrator.
Stay tuned for another tutorial I’m working on detailing how to add multiple Data sets to a sheet in a semi-painless manner. (EDIT: You can see this tutorial here: http://hypertransitory.com/blog/2016/04/11/adobe_illustrator_variable_data_multiple_datasets/
For a final announcement, earlier I mentioned that version 8 of the Variable Importer is already out. Well, I’ve actually created a video course that walks through all the bells and whistles of using that new script for variable data, and
it will be available on Lynda.com very soon IT’S HERE! So those of you interested in checking it out can get more info on the Adobe Illustrator Variable Data Lynda.com course at that link.
With that said, I’m outta here. Leave me a comment or otherwise contact me if you have any questions or issues.