I read the answers to the following question: Illustrator variables / data-driven documents: how to batch-export one file for each data set? So now I have multiple files created...awesome! But now I want to remove the extra data sets from each of these files and can't figure out a way to automate this feature.
1 Answer
This is a rare question, as I think most users just accept this and trudge on, but I can think of just a couple of ways to do this:
- Save formats which do not retain the data, if you can: a PDF without Illustrator Editing capabilities being preserved.
- After saving all of your files, run another "post" batch on the entire resulting file set with an action that plays the following script from the menu item ( you must have this put into your Illustrator scripts folder, etc). Make this action do a Save and Close for ultimate simplicity.
function test(){ var doc = app.activeDocument; for (var i = doc.variables.length - 1; i > -1; i--) { doc.variables[i].remove(); } }; test();