Illustrator Variables

hi!

i have an Illustrator CS6 pie chart graphic element that i’d like to automate based on an external xml file via “Load Variable Library” option under Variables window.
Manual process works fine:
open pie chart template in Illustrator
“Load Variable Library” option under Variables window
select XML file
change Data Set
save file

Unfortunatelly i can’t find a way to automate this process… anybody has experiance with Illustrator Variables?

The Applescript Reference and Scripting Guide have entries for AI’s “variable” and “dataset” objects, including a “make” command, so this should be possible.

https://www.adobe.com/content/dam/acom/en/devnet/illustrator/pdf/Illustrator-Scripting-Reference-AppleScript-cs6.pdf page 204.

There is a very small amount of information in the Scripting Guide on page 21:
https://www.adobe.com/content/dam/acom/en/devnet/illustrator/pdf/Illustrator-Scripting-Guide-cs6.pdf

It’s also possible this may be of use:
https://github.com/Silly-V/Adobe-Illustrator/tree/master/Variable%20Importer

Unfortunately, I couldn’t find any actual code examples of people making variables in AI. So while it appears to theoretically be possible, the syntax for correct usage may be hard to piece together.

This might be useful too:

http://hypertransitory.com/blog/2015/04/26/illustrator-variable-data/