• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Script to Rotate Artboard by entered amount?

Advocate ,
Jan 14, 2022 Jan 14, 2022

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. Screen Shot 2022-01-14 at 7.51.07 AM.jpg

TOPICS
Scripting

Views

237

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 Expert ,
Jan 14, 2022 Jan 14, 2022

Copy link to clipboard

Copied

Hi,

You want to rotate the artboard or resize the artboard?

 

Best regards

Votes

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
Advocate ,
Jan 21, 2022 Jan 21, 2022

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

Votes

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 ,
Jan 21, 2022 Jan 21, 2022

Copy link to clipboard

Copied

LATEST

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");

 

Votes

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