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

Extendscript Illustrator

New Here ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

Hi!

I wrote a script in JavaScript for Adobe Illustrator CC 2017. In this script I am trying to add artboard to the document in function, but it isn't working.

Here code:

function addArtboard() {

    var doc = app.documents.add(null,1000,1000);

    doc = app.activeDocument;

    var artboards = doc.artboards;

     artboards.add([0 , 0, 1000, 1000]);

}

addArtboard();

Thanks!

TOPICS
Scripting

Views

900

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 ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

change the last element of the parameter in your artboards.add method to -1000. like this:

function addArtboard() {

    var doc = app.documents.add(null,1000,1000);

    doc = app.activeDocument;

    var artboards = doc.artboards;

     artboards.add([0 , 0, 1000, -1000]);

}

addArtboard();

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
New Here ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

Hi. In my code artboard is been adding when I write out of function, but when I wrote in a function the artboard isn't adding.

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 ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

can you paste the exact code you're running? I tested this and it worked fine for me.

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
New Here ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

please give me your email

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 ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

You can send me a direct message here on the forum. just click on my username and it will open my profile.

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
New Here ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

LATEST

The send button doesn't work

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