Skip to main content
Participant
July 12, 2022
Question

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

  • July 12, 2022
  • 1 reply
  • 548 views

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)];
}  

 

 

This topic has been closed for replies.

1 reply

Met1
Legend
July 12, 2022

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

Participant
July 12, 2022

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.

CarlosCanto
Community Expert
Community Expert
July 12, 2022

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/10767994