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

How can I put my ruler origin in the left upper corner of my workspace and make an artboard?

New Here ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

I want to put my ruler origin to the upper left corner of my workspace so I can make an artboard that covers the whole workspace. If I do it with the code I have now it just put the ruler at the origin of the first artboard I have, but I don't know why. And if I can put the ruler to the upper left corner by javascript(not by hand) does somebody know how I can create an artboard that covers my whole workspace? 16383 is the maximum size of the workspace in points.

 

myDoc = app.activeDocument; 
myDoc.rulerOrigin = [0,myDoc.height];
 
var rect = rect(0, 0, 16383, 16386);
var myArtB = myDoc.artboards.add(rect);
 

function rect(x, y, w, h) {
    return [x, -y, (x + w), -(y + h)];
}  

 

 

TOPICS
Scripting

Views

177

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
Mentor ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

I think you have to tell it whether it's global origin set-up or artboard...

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 ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

It's global but how do I put it in the script? I thaught that because I say 'myDoc' it assumes that it is global, I don't mention an artboard? But apperently it doesn't work like that.

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 ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

check this thread, OMOTI found a way of finding the global Left/Top coordinates

 

https://community.adobe.com/t5/illustrator/create-first-artboard-on-top-left-of-canvas-how/td-p/1076...

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 ,
Jul 12, 2022 Jul 12, 2022

Copy link to clipboard

Copied

LATEST

Does making the dimensions for the bottom, right the same (16383) make any difference?

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