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

Script or action to set open vector drawing's units to inches and artboard to 24"x24"

New Here ,
Oct 24, 2020 Oct 24, 2020

Copy link to clipboard

Copied

I am bringing in a large number of vector files from different sources. When opened the vector drawings have units set to points, mm, etc. and various sized artboards. For each opened vector drawing I want to set the unit to inches and the artboard to 24"x 24". I am setting each of these parameters manually in Document Setup for each vector. Is there a script or action that will allow setting one or both of these parameters? I apologize in advance if there is a simple way to do this that I am unaware of. Any guidance would be appreciated.

TOPICS
Import and export , Scripting , Tools

Views

162

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
Guide ,
Oct 25, 2020 Oct 25, 2020

Copy link to clipboard

Copied

Assuming one artboard, this should resize it:

var AB = app.activeDocument.artboards[0];
var w = 24 * 72;
var h = 24 * 72;
AB.artboardRect = [AB.artboardRect[0], AB.artboardRect[1], w, -h];

Adding this line

app.executeMenuCommand("unitundoPref");

 at the end will bring up the units dialog box, but you will have to select your units manually.  Also, this causes buggy behaviour for me in CS6.

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
New Here ,
Oct 26, 2020 Oct 26, 2020

Copy link to clipboard

Copied

LATEST

Thank you!

--
Matthew

 



[ private informations removed by moderator for security reasons ]

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