|
Home
> Articles
> Illustration >
Adobe Illustrator 10
Adobe Illustrator Tutorials : Adobe
Illustrator 10: Cutting
Your Design Time in Half with Variables"
by Dean Bagley
If
you are a graphic artist or designer you will know how much time
it takes to put together an ad, brochure or flyer, from placing
the pictures, to typing headlines and formatting body copy. What
if a client wanted you to create a campaign series of six ads, all
with the same look, but with different pictures and text that change
each month the ad appears?
Adobe Illustrator has released its latest version 10 with a new
feature called "Dynamic Graphics." This utilizes their new Variables
feature which means that text blocks and linked graphics can be
assigned to a variable name saved in a Data Set and exported as
an external XML file.
This
external XML file can then be duplicated, renamed (such as "Ad 2")
and modified to insert new graphics, and paste new text into the
old text blocks. When this XML file is brought back into the Illustrator
document, the design will immediately change to take on the new
graphics and text as defined in the imported XML file.
Keep
in mind that all placed images (EPS, JPG, TIF, etc.) must be
Linked when placing them. The text blocks (can be either point-text
blocks or area-text blocks) do not need to be linked.
This
may sound complicated, so let me give an example. Here is an ad
for a travel agency. The client wanted a campaign of ads that had
the same format, but possessed different pictures and text to advertise
a variety of special tours.
Each
object was selected individually and assigned to a variable in the
Variables palette.
- The
photograph was selected and a variable created named "photo"
- The
"Spring Special" was named "special"
- The
"Time Travel" headline was named "headline
- The
"Only $450" was named "subhead"
- The
body text block was named "bodytext"
The
icon to the left of the Data Set name was clicked to "capture" the
variables into a Set. This was automatically named "Data Set 1".
The Variables palette pop-out menu was selected and Save Variable
Library chosen. This saved the variables set to an XML file, which
is a common ASCII text file.
This
XML file defines all the variables of the original ad and should
be duplicated so the first ad can be accessed for later use. A simple
word processor was used to open the duplicate XML text file. You
will notice that it contains tags as with any HTML file. You will
see a tag called "dataSetName=" with "Data Set 1" as the name. This
can be changed to a different name so when the XML file is imported
back into Illustrator, the name can clearly specify the contents
in the Variables palette.
The
word processor was used to replace the items described by the variable
tags. You will note the variable tags and their content text in
between paragraph (p) tags. This text is what must be replaced.
- The
dataSetName was changed to "Ad 2"
- The
Hill_town.jpg file was replaced with "Hercules.jpg", showing the
famous statue of Hercules.
- The
text of the "special" variable was replaced with "Hercules Special!"
- The
"headline" text was changed to "Power Plan!"
- The
"subhead" text was changed to "Only $550"
- The
"bodytext" text had new text pasted in between its separating
paragraph tags. These tags designate paragraphs in the text.
Back
in the Illustrator document, the Variables palette pop-out menu
was again selected and Load Variables Library chosen. A warning
message always appears telling you that there are variables of the
same name, and do you want to go ahead and import anyway? You should
click OK for them to be replaced with your new changes.
On
the screen nothing happened. To activate this imported library,
the Data Set menu was selected and the new "Ad 2" set chosen. In
just seconds the picture and all the text was replaced by the new
items in the XML file.
In
short, one master ad was created with variables. From this any number
of other ads of the same format could be made just by modifying
the XML code and replacing the variable items.
The
XML file can be duplicated to have a copy for each ad desired. In
the XML files all the variables can be updated so that the only
effort needed to create a new ad is to, in seconds, load the new
XML library.
What
to watch out for!
To save
you hours of pulling your hair out when you get the dreaded "Cannot
Update Because of an Unknown Error", let me describe how finicky the
importing of the XML file can be.
1.
The XML file is like HTML. It contains tags, such as <variable01>
. It is mandatory that these tags remain intact. Some word processor
programs think they're doing you a favor by reading tags for their
formatting purposes, and getting rid of the tags. MS-Word is infamous
for this. The XML file is "text only" or ASCII or ANSI. So, be sure
when you are altering the XML file in a processor that you make
sure it is keeping all the tags.
2.
Special characters will also be a bomb to your XML file when you
try to import it back into the Illustrator document. Ampersands
(the & symbol) will create errors. Plus, all the special European
language symbols, such as the "o" with two dots above it. Make sure
any text you enter or paste into an XML file is straight from the
ASCII or ANSI alphabet of characters.
3.
XML is case sensitive. I pulled my hair out for hours trying to
figure out why my pure ASCII text was still causing an error. It
was due to my using a capital "P" in the tag <P> as opposed
to lower case <p>. That one mistake cost me hours of delay.
Make sure all your tags are lower case.
4.
Area text blocks in Illustrator can be applied to variables. But,
be careful! I have found that only a limited amount of text can
be imported back into the document. Large quantities of text will
be truncated in the variable text block when importing the XML file.
You will wonder where all the text went.
Dean
Bagley is a writer, graphic designer and cartoonist. He writes
instruction books for the Simon & Schuster/Prentice-Hall series of
Against The Clock books on digital graphic design. The Adobe Illustrator
books (Intro and Advanced) are at the top of the list in his book
repertoire.
He
also writes and illustrates his own children's stories about his
cartoon character, Baggy Gator, who has his own site at www.baggygator.com.
|