Mobile app version of vmapp.org
Login or Join
Fox8063795

: How to batch save data driven graphics with a script in Illustrator? I build data-driven graphics in Illustrator and am able to run a batch "Save to PDF" action on these graphics. Can I do

@Fox8063795

Posted in: #AdobeIllustrator #BatchProcessing #IllustratorScripting

I build data-driven graphics in Illustrator and am able to run a batch "Save to PDF" action on these graphics.

Can I do the batch "Save to PDF" action with a script instead? My thinking is that the script will have to loop through the datasets somehow, but unsure where to start.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Fox8063795

1 Comments

Sorted by latest first Latest Oldest Best

 

@Shelley591

here's a sample showing how to loop thru the Datasets

var idoc = app.activeDocument;
var ds = idoc.dataSets;
var activeds = idoc.activeDataSet; // save the current dataset


for (i=0; i<ds.length; i++) {

ds[i].display(); // this is the same as clicking the dataset arrows in the UI
app.redraw(); // we don't need to redraw, it's here so you can see as they change

doyourthing ();

alert('data set: ' + i);
}

activeds.display(); // display the original active dataset

function doyourthing() {
// save to pdf here
}

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme