5 Replies Latest reply on Mar 18, 2015 5:32 PM by Stephen_A_Marsh

    variable data in Illustrator

    iBabs2 Level 1

      Hello,

      Before I go crazy here, I am wondering if you can populate a document with a different image and name using variable data.

      Can the image and name be outside the document in an excel sheet for example? If so, how would images be handled...

      If anyone could lead me to a really good tutorial on this, I would he very grateful.

      The ones I have found so far, are not helping me.

      thanks!!

      babs

        • 1. Re: variable data in Illustrator
          Wade_Zimmerman Level 6

          There are no real good tutorials on this it seems.

           

          I know that you can save the xml file straight from AI and then alter that document by copying the data set info and changing the copied data set to include new text for instance I believe also new images as well and each data set can then be loaded.You can import the daa sets from excell as well but I unfortunately believe you need to script this but what you want to do is possible through scripting.

           

          Perhaps the scripting forum would be more helpful.

           

          You can have linked files set as a variable

           

          Screen shot 2010-06-08 at 12.42.37 PM.png

          1 person found this helpful
          • 2. Re: variable data in Illustrator
            iBabs2 Level 1

            Hi Wade,

             

            Yeah, I really searched, but couldn't find too much.

             

            I was able to figure out through bits and pieces how to change the text and change the linked pictures. So far so good.

            I did export the data set as an xml file and I could see how easy it is to replace the data and re-import the xml file ;-)

             

            I was hoping to would be more like data merge in InDesign where I could take from an excel sheet, but, this isn't too bad..

            thanks for your help... and yes, I will check the scripting area.

            babs

            • 3. Re: variable data in Illustrator
              JETalmage Level 6

              Babs,

              You can use the Variable Data feature (the Variables palette) to create DataSets. You can then "bind" objects on the page to act as "placeholders," so to speak, for the text, images, visibility settings, or graph data that is contained in the current DataSet. You can then switch between DataSets to automatically re-populate the "placeholders." You can then semi-automate the swapping out of the DataSets to, for example, run exports or saves or prints in batch mode.

               

              The file that contains the data can be an external file that you import as an Illustrator Variables Library.

               

              However, the Variables feature set is based on XML, not on ordinary tab-delimited rows/columns like you are accustomed to in Excel. So you can't import an Excel file or any other ordinary row/column delimted text file into the Variables palette to create your DataSets. Excel and other programs (FileMaker Pro, for example) can export  XML from their rows/records. But unfortunately that's not all there is to it.

               

              XML is a tag-based markup language. An XML file doesn't necessarily follow a consistent rows/column kind of order germane to a spreadsheet or database table. The occurrances of Column/Row intersections (Elements) can be arbitrary. For example, imagine a spreadsheet with columns A, B, and C, and rows 1, 2, and 3. The arrangement in an XML file is not necesarily:

               

              1A, 1B, 1C

              2A, 2B, 2C

              3A, 2B, 2C

               

              It may be:

               

              1A, 1A, 3A, 2B, 2C, 1B, 1B, 1B....

               

              ...or any other arbitrary order and/or nesting arrangement of the Elements.

               

              So an XML file has to be "described" in order to be understood by the program that imports it. The XML file contains reference to a Schema or a Document Type Definition (DTD file) for that purpose. So to use Illustrator's Variables palette in that way, you have to get somewhat into the arcana of XML.

               

              That's about the extent of what I know about XML. Correction by anyone who acutally understands and works with XML is welcome.

               

              I haven't taken any polls, of course, but I dare say that the vast majority of users who actually ever touch the Variables palette just tediously enter the data directly into the bound objects in the Illustrator document and capture the DataSets as they go. A small minority does that with just a few sample DataSets, then exports the DataSets as a Variables Library (an XML file), and uses that file as the "template" into which they then insert the rest of the data from their spreadsheet or whatever, using a script or some other semi-automated routine. An even smaller minority actually creates the ready-to-import XML file from scratch.

               

              I have found it possible to import XML exported from FileMaker Pro directly into InDesign. But I cannot do that in Illustrator. For text-only purposes, I have resorted to writing a Javascript that lets me enter (or paste) ordinary tab-delimited text into a text object in Illustrator. The script then converts that text to Variable DataSets. I imagine it would not be hugely difficult to modify that script to also accommodate references to linked images, but I have not had the occasion or need to do so.

               

              I personally think the Variables feature would have been of much broader value across the AI user base had it been based on straightforward tabular data, like the data merge features in many programs, instead of XML. I guess that would be anethema to the XML users whom I assume must have asked for this feature being implemented this way. Or, it may have just been driven by Adobe-internal "me, too" gotta-have-it direction.

               

              JET

              • 4. Re: variable data in Illustrator
                iBabs2 Level 1

                Hi JET,

                Thanks for all this info!!!

                I agree, for the most part it is just as easy to just change the dynamic text in Illustrator and update instead of changing the xml and reloading it. It's not nearly as good as what InDesign offers with the ability to use excel or any tab-delimited data set, but for a business card or flyer or invitation that just has  a few things changing here and there, it's not bad. It still allows me to have one Illustrator file, not 20 (if there are 20 version or more), making updating fairly easy. So, I have figured what I need for now, and will try to find uses for it at this stage ;-)

                thanks!!

                babs