Copy link to clipboard
Copied
I'm not sure if theres a script i couldnt find one where you enter your amount to rotate. I'm looking for the script to look something like the attached file. And i'd like to be able to select via check box (IF POSSIBLE) to make it work for Active document or All open documents.
Copy link to clipboard
Copied
Hi,
You want to rotate the artboard or resize the artboard?
Copy link to clipboard
Copied
Sorry it took so long to reply works been busy.. No i just want it to rotate the artboard I just grabbed a script that was for resizing the artboard for reference.. All i need it a text field or soemthing i can enter % to rotate if possible if thats crazy difficult just something that rotates 0, 90, 180, 360 will work.
thank you..
Copy link to clipboard
Copied
This should rotate the artboard and artwork ±90, 180, 270 or 360° (any other number will cause an error):
var groups = app.activeDocument.groupItems;
var d = app.activeDocument.artboards[0].artboardRect;
rect1 = app.activeDocument.pathItems.rectangle(d[1], d[0], d[2], -d[3]);
app.executeMenuCommand("selectall");
app.executeMenuCommand("group");
groups[0].rotate(-Number(prompt("Enter ±90, 180, 270 or 360.")));
app.executeMenuCommand("deselectall");
rect1.selected = true;
app.executeMenuCommand("setCropMarks");
app.activeDocument.artboards[0].remove();
app.executeMenuCommand("selectall");
app.executeMenuCommand("ungroup");
app.executeMenuCommand("deselectall");