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

82

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
Guide ,
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...

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
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.

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 ,
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...

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 ,
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?

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