John Garrett explains how to use the Layers panel to name the objects that appear on the artboard in Adobe Illustrator. He goes over how naming the objects helps you later to automatically match and bind your CSV headers to the objects in the Variables panel. He also explains an potential issue with naming text objects.
- [Voiceover] Earlier, I explained each of the variable types Illustrator uses and how to create them for use with the Adobe default method. Now, I wanna back up a bit and go over some best practices on setting up your variables for use with the variable importer script. Naming our objects can save us a lot of time when you're ready to import your data because the script can automatically match up the name of the object with the headers in our spreadsheet, saving us a tedious extra step of binding the variables. To name our objects, we're going to need the layers panel.
If you don't see your layers panel by default, you can activate it by selecting layers from the window menu at the top. Let's check out the layers panel for our file. We've already got quite a few layers here but the variable in porter script doesn't really care about our layers. I always tend to use layers to organize my variables because it's easier to select and hide them when they're on separate layers. It's definitely not necessary for you to do the same, though. Since the variable importer doesn't acknowledge the layers, we need to work with the actual objects that exist on the layers.
To connect the objects, we'll have to clock the disclosure triangle to the left of the layer name which will then show us all the objects on the layer in a list. You can move items up and down the stacking order here by dragging them. You can select items by clicking the button to the right of the name or you can hide them by clicking the eye icon to the left, just as you can with the layers themselves. The part we're interested in is the ability to rename the objects to a name of our choosing. Specifically, we want to change the name to match the names of our spreadsheet headers.
Or if we haven't made our spreadsheet yet, we can go ahead and name the objects, then match the spreadsheet headers to those later. Just double-click on the name of an object in the layers panel to make the field editable. Then you can change the name to whatever you want. If you're using CS5, this will pop open a dialogue box instead. In the case of the object on my real name layer, you can see I've named it hero_real_name. You'll see later that this is the same name as one of the headers in our spreadsheet file.
Could name any object. Not just text objects. Looking through the layers, we can see I've named everything. Including the images and the graph object. However, there is one special feature of text objects that can be a problem. This is actually a helpful feature which can unfortunately get in the way when working with variables. To demonstrate, I'm going to create a new text object and just type text. If we look closely at the object in the layers panel, we can see it showing there.
The object appears as text in the layers panel but this actually is not the name of the object. What we're seeing now in the layers panel is simply a preview of what exists on the art board. I can show this by typing in more text on the art board. I'll change it to my_text. And my type changes will appear in the layers panel. This could be a problem if I were to believe that my object was actually named my_text. Trying to match it in my spreadsheet would fail since the object has no name.
To demonstrate another example, I'll type my_text into the object's name field in the layers panel, which is the exact same thing that appears on the art board. Right now, you think that I named it since I typed directly into the object's name field, but going back to the art board and adding more text will only verify that I haven't named it yet. The object in the layers panel will still show the preview of the text on the art board. To prevent this, I'd recommend always specifically naming your object in the layers panel and make sure to name it something different than what appears on the art board.
Just to demonstrate, I'll change this to my_new_text_2. Now, updating the text on the art board will have no effect. As we can see, the layers panel is now showing the actual name of this object and no longer showing the preview of the text on the art board. I'll delete this extra text now that I've shown what to watch out for. As you build your own files, for use with the variable data, take the time to name the objects as you add them.
I'll show how much time you can save by doing this later on in chapter five.
Designer John Garrett appreciates the many different types of variables and their practical uses, including generating business cards and direct mailers. In this course, he explains how to use variable data including managing linked images, graphics, tables of data, and graphs. He covers the entire workflow, from setup to exporting dynamic batches.
- Setting up Illustrator files
- Using Appearances
- Setting up data sources
- Importing data
- Managing linked variables
- Binding and using prepend paths and presets
- Using the Variables panel
- Naming data sets
- Generating multiple versions with batch exporting