• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

CS4 Multi Artboards (ie: 5 pages) need to be split 5 different ai files

Community Expert ,
Sep 24, 2010 Sep 24, 2010

Copy link to clipboard

Copied

I didn't think it was going to be that difficult to go from VBA to JS (not having a clue on JS). Here's my first JS script to help with this question. It should work for CS4.

http://forums.adobe.com/thread/726864?tstart=0

//splits the activeDocument Artboards into individual files

var doc = app.activeDocument;

var docName = doc.name;
var docPath = doc.path;
var fullName = docPath + "/" + docName;
var abRange = ""

for (i=1; i<=doc.artboards.length;i++)
    {
        abRange = abRange + i + ","
     }
IllustratorSaveOptions.saveMultipleArtboards = true;
IllustratorSaveOptions.artboardRange = abRange;

var newFile = new File(fullName);
app.activeDocument.saveAs (newFile, IllustratorSaveOptions);

alert ("Artboards Saved to current document's Folder", "Split Arboards");

TOPICS
Scripting

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Sep 24, 2010 Sep 24, 2010

Copy link to clipboard

Copied

Carlos:

artboardRangestringr/wIf SaveMultipleArtboards is true (Which is valid for AI 13 or earler saves only),this will be considered for multi-asset extraction which specifies artboard range.Empty string will extracts all the artboards.Default is empty string.

(my emphasis). So you can probably do with just this:

IllustratorSaveOptions.artboardRange = "";

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 24, 2010 Sep 24, 2010

Copy link to clipboard

Copied

LATEST

that's correct, I didn't try to test it with empty string before. Only difference I found using empty string is it Re-saves the Active Document too (with all artboards) (and also asks if it is ok to overwrite) + all separate files.

thanks for pointing that out.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines