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

Change origin of artboard rulers

Explorer ,
Mar 21, 2018 Mar 21, 2018

Copy link to clipboard

Copied

Hi everybody !

First, I am a beginner in javascript, so I'm sorry if I ask stupid questions

I set myself a goal for my first script : changing the origin of artboard rulers. After reading a million posts about this, I managed to change globals rulers but I still haven't succeeded to change artboard rulers. I need help for this first mission because I have no idea how to change the rulers.

Thank you very much !

Have a nice day

TOPICS
Scripting

Views

3.5K

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

correct answers 1 Correct answer

Community Expert , Mar 21, 2018 Mar 21, 2018

Hi miyano_,

try this for the beginning:

var aDoc = app.activeDocument;

alert(aDoc.rulerOrigin); // in points

alert(aDoc.pageOrigin); // in points

And this thread could also be interesting for you:

JS - change CS5 Ruler Origin to bottom/left (like CS4)

Have fun

Votes

Translate

Translate
Adobe
Community Expert ,
Mar 21, 2018 Mar 21, 2018

Copy link to clipboard

Copied

Hi miyano_,

try this for the beginning:

var aDoc = app.activeDocument;

alert(aDoc.rulerOrigin); // in points

alert(aDoc.pageOrigin); // in points

And this thread could also be interesting for you:

JS - change CS5 Ruler Origin to bottom/left (like CS4)

Have fun

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 ,
Mar 23, 2018 Mar 23, 2018

Copy link to clipboard

Copied

Hi pixxxel schubser,

Thanks for your answer ! I used "artboardRef.rulerOrigin = [(x), (y)]; ", It works well !

Have a nice day !

Miyano

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
Contributor ,
Feb 21, 2019 Feb 21, 2019

Copy link to clipboard

Copied

For me I run this:

aDoc.rulerOrigin = [0, 0];

aDoc.pageOrigin = [0, 0];

alert(aDoc.rulerOrigin);

alert(aDoc.pageOrigin);

This alerts me of 0,0 as the coordinates for both rulerOrigin and pageOrigin.

However when I go to place something.

like placeFiles.top = 0

placeFiles.left = 0

the placed file appears at the bottom. 

I'm not sure what I'm missing but it makes no logical sense to me.

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 ,
Apr 19, 2019 Apr 19, 2019

Copy link to clipboard

Copied

LATEST

var aDoc = app.activeDocument; 

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