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)];
}
Copy link to clipboard
Copied
I think you have to tell it whether it's global origin set-up or artboard...
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.
Copy link to clipboard
Copied
check this thread, OMOTI found a way of finding the global Left/Top coordinates
Copy link to clipboard
Copied
Does making the dimensions for the bottom, right the same (16383) make any difference?