How to delete specific Artboard in illustrator using script

Participant ,
Jun 03, 2016 Jun 03, 2016

Copy link to clipboard

Copied

Here u can see 4 art boards on attached screenshot, but i want to delete 1,3,4 art boards

Screen Shot 2016-06-04 at 11.51.39 AM.png

i like to work with art board 2

TOPICS
Scripting

Views

2.2K

Likes

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

correct answers 1 Correct answer

Engaged , Jun 06, 2016 Jun 06, 2016
just wrap Alexander's script in a do javascript to incorporate it into your applescript workflow. tell application "Adobe Illustrator"     do javascript "    function removeArtboards ( arr ) {          var i = arr.length; while ( i-- ) activeDocument.artboards[ arr[i] ].remove();      }      removeArtboards( [0,2,3] );  " end tell

Likes

Translate

Translate
Participant ,
Jun 03, 2016 Jun 03, 2016

Copy link to clipboard

Copied

As an option:

function removeArtboards ( arr ) {

    var i = arr.length; while ( i-- ) activeDocument.artboards[ arr[i] ].remove();

}

removeArtboards( [0,2,3] );

Likes

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
Participant ,
Jun 03, 2016 Jun 03, 2016

Copy link to clipboard

Copied

Its work good,

how to convert this in Applescript

Likes

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
Participant ,
Jun 04, 2016 Jun 04, 2016

Copy link to clipboard

Copied

Unfortunately I do not write on applescript.

Likes

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 Professional ,
Jun 04, 2016 Jun 04, 2016

Copy link to clipboard

Copied


karthickm50893796 schrieb:

… how to convert this in Applescript

You can use Javascript under MacOS too. It is not necessary to rewrite all Javascripts in Applescript. And the most people here „speaking“ Javascript.

Likes

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
Engaged ,
Jun 06, 2016 Jun 06, 2016

Copy link to clipboard

Copied

just wrap Alexander's script in a do javascript to incorporate it into your applescript workflow.

 

tell application "Adobe Illustrator"

    do javascript "    function removeArtboards ( arr ) { 

        var i = arr.length; while ( i-- ) activeDocument.artboards[ arr[i] ].remove(); 

    } 

    removeArtboards( [0,2,3] );  "

end tell

Likes

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
Explorer ,
Feb 15, 2022 Feb 15, 2022

Copy link to clipboard

Copied

can you update the jsx script it dosen't work for me

Likes

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 Professional ,
Feb 15, 2022 Feb 15, 2022

Copy link to clipboard

Copied

try copying the script again, I just fixed the missing indexes

Likes

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
Explorer ,
Feb 16, 2022 Feb 16, 2022

Copy link to clipboard

Copied

LATEST

Thank you

Likes

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