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

How to read rectangle reference point in Writing Script

New Here ,
Aug 16, 2019 Aug 16, 2019

My input file have two objects(text frame and image frame) those objects at different reference point(TopLeft and TopRight).

My Question:

1. How to read reference point in selected object?

2. How to change reference point same point(TopLeft) in two objects.

My Input:

Expectation output: Two object same reference point.

TOPICS
Scripting
1.3K
Translate
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

Advocate , Aug 16, 2019 Aug 16, 2019

You can get by this code:

alert(app.activeWindow.transformReferencePoint);

Best

Sunil

Translate
Community Expert ,
Aug 16, 2019 Aug 16, 2019

Hi,

false expectations.

If a frame is rotated by e.g. 90, 180, 270 or -90, 180, 270 the widget showing the reference point will be rotated along.

Regards,
Uwe

Translate
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 ,
Aug 16, 2019 Aug 16, 2019

How to read rectangle reference point in Writing Script

If you are trying to script it, the reference point is a property of the layout window not a page item. So in AppleScript this sets the current reference point:

tell application "Adobe InDesign CC 2018"

    set transform reference point of layout window 1 to bottom right anchor

end tell

For JavaScript here is the API

https://www.indesignjs.de/extendscriptAPI/indesign10/#LayoutWindow.html

Translate
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 Employee ,
Aug 16, 2019 Aug 16, 2019

Moving the discussion to InDesign Scripting​ community.

Translate
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 ,
Aug 16, 2019 Aug 16, 2019

You can get by this code:

alert(app.activeWindow.transformReferencePoint);

Best

Sunil

Translate
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 ,
Sep 17, 2019 Sep 17, 2019
LATEST
How to use active-window in server. Any option ?
Translate
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