Mobile app version of vmapp.org
Login or Join
Gretchen549

: Is there a way to automate reversing the order of artboards in Illustrator? Is there a way to reverse the order of artboards so that pages 1 2 3 4 become 4 3 2 1 ? I am trying to extract

@Gretchen549

Posted in: #AdobeIllustrator #Artboard #Automation #IllustratorScripting

Is there a way to reverse the order of artboards so that pages 1 2 3 4 become 4 3 2 1 ? I am trying to extract the English pages from a bilingual booklet and changing each artboard manually is not the most efficient.

(Looking for automation solution)

Thanks in advance

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Gretchen549

1 Comments

Sorted by latest first Latest Oldest Best

 

@Shelley591

use this script,

// reverseArtboardsOrder.jsx
// carlos canto
// graphicdesign.stackexchange.com/questions/64865/is-there-a-way-to-automate-reversing-the-order-of-artboards-in-illustrator
function reverseArboardsOrder () {
var idoc = app.activeDocument;
var abs = idoc.artboards;
var abcount = abs.length;

var abNames = [];
var abRects = [];

for (i=0; i<abcount; i++) {
abNames[i] = abs[i].name;
abRects[i] = abs[i].artboardRect;
}

for (j=0, k=abcount-1; j<abcount; j++, k--) {
var abRect = abRects[k];
idoc.artboards.remove(k);
var newab = idoc.artboards.add(abRect);
newab.name = abNames[k];
}
idoc.rearrangeArtboards();
}

reverseArboardsOrder();

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme