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

Running a script switches Illustrator units to Picas

Explorer ,
May 08, 2018 May 08, 2018

Copy link to clipboard

Copied

Every time I run a script the Illustrator switches to Picas measurement units so that if I create a new document it will be like this

screen_ai.png


Before that the default measurement units was mm.

Why does the script changes units?

TOPICS
Scripting

Views

788

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
Explorer ,
May 08, 2018 May 08, 2018

Copy link to clipboard

Copied

After the script executed the units in preferences changed also from millimiters to picas

вапрвапр.png

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
Community Expert ,
May 08, 2018 May 08, 2018

Copy link to clipboard

Copied

can you share the script you're running so we can try to identify what might be causing the issue?

Are you saying that you open a file that has it's general units set to MM, then after the script finishes executing the document's general units are set to Picas? Or are you saying that your script creates a new file and the result is Picas instead of the desired MM?

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
Explorer ,
May 08, 2018 May 08, 2018

Copy link to clipboard

Copied

LATEST

I found out that this line caused the issue:

app.preferences.setIntegerPreference("rulerType", 3);

I do not remember wher did I found that line but there was information that that line changes rullers units to millimiters.

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