Anyway, I tend to start with the artboard at tabloid (17x11) or 2x tabloid (34x22) and then grow the artboard incrementally as I go. I change the artboard regularly enough and in such a predictable way that I went ahead and made the script below:
----
if (documents.length == 0) {
alert("Must have a document open!");
}
TABLOID_LANDSCAPE_W = new UnitValue (17, "in");
TABLOID_LANDSCAPE_H = new UnitValue (11, "in");
curWidth = activeDocument.artboards[0].artboardRect[2];
curHeight = activeDocument.artboards[0].artboardRect[3];
isWidth = confirm("Extend width?");
if(isWidth) {
newWidth = curWidth + TABLOID_LANDSCAPE_W.as("px");
activeDocument.artboards[0].artboardRect = [0,0,newWidth,curHeight];
} else {
newHeight = curHeight -TABLOID_LANDSCAPE_H.as("px");
activeDocument.artboards[0].artboardRect = [0,0,curWidth,newHeight];
}
----
It's pretty simple, but I thought I might as well share the idea and the script for whomever might find it useful. Here's how it works:
- First check to make sure a document is open.
- Define the width and height that I'm going to use to extend the artboard.
- Get the current width and height of the artboard.
- I use a confirm dialog to ask if you want to extend the width, otherwise the script will extend the height.
- Finally, calculate the new width or height and extend the artboard.
No comments:
Post a Comment