Another handy automation within Illustrator is your ability to create graphics with variable data. This prevents you from having to create numerous versions of the same file over and over.
To better understand this feature, let's look at an example. Say you work for a company that produces a product sold in different countries. The company has a website in each country's native language, so the graphic you produce will vary based on the site on which it appears. Rather than creating a number of different graphics, you can create a single ad with fields for the variable data. References to the variable data are stored in the Variables palette (choose Window, Variables to display the palette, as shown in Figure 22.5).
Figure 22.5. Illustrator creates data-driven graphics using the Variables palette to define the graphic areas and link them to the variable information.
A note about data-driven graphics: They must be saved in SVG format. As previously mentioned, SVG is not completely supported by all web browsers, or wasn't at the time of this writing. Displaying SVGs in Internet Explorer, for example, requires a plug-in from Adobe. Support in Mozilla browsers, including Firefox, was still in development. Depending on when you read this, you may or may not be giggling at the antiquity of this reference because SVG does look poised to take off, but you're better safe than sorry. Check it out before you commit a lot of time to creating these graphics.
The first step is to create your graphic with all of the information in place. Then, tag each element based on its variable type.
There are four types of variables that can be created. Graph data is created from existing graphs, linked files display from Illustrator links, text strings are created from text, and visibility variables can be shown or hidden by your choice. You can also create a variable without assigning a specific type to it:
After you identify your variables, you can define specific pieces of information as data sets, which can then be associated with the variables in your piece of artwork. To do this, create a type frame, for example. Select it and then select Capture Data Set in the Variables palette menu. To associate a data set with a variable, select the defined variable object on your layout, and then use the Data Set pop-up menu at the top of the palette to scroll through your defined data sets.
For visibility objects, toggle the visibility of specific objects using the Layers palette.