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

Script to measure distance between two frames/objects?

Community Beginner ,
Apr 23, 2019 Apr 23, 2019

Is there a script to measure the distance between frames and edges like the gap tool. And then be able to output that measurement on the page like a markup? Is this even possible?

TOPICS
Scripting
1.6K
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
People's Champ ,
Apr 23, 2019 Apr 23, 2019

Sure it is. Geometry involved. See at Page Item's geometric properties.

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
Engaged ,
Apr 24, 2019 Apr 24, 2019

Have a look at this thread. It may be helpful for your task:

Re: Sorting images based on their position on the page

Stefan

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 Beginner ,
Apr 24, 2019 Apr 24, 2019

Thank you both for your quick reply. Unfortunately I have zero scripting knowledge. Stefan's link looks like it could do something like I want. Just to give a clearer visual I've attached a screenshot.

I would love to run a script and then have the document marked up with the size and spacing between object/frames/edges. Let me know what you think and if you know if something like this already exits.

Thanks

Screen Shot 2019-04-24 at 11.17.18 AM.png

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
Engaged ,
Apr 25, 2019 Apr 25, 2019

Very interesting project. Have a look also at the AddGuides.jsx Script from the InDesign Sample scripts as a starting point for getting into scripting. This script adds a guide around every pageItem selected.

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

I have a free script from my website (along with many others) that will draw measurement rulers to the right and below of highlighted objects:

https://colecandoo.com/scripts/

Another scripter "Dr Scripto" has a similar script but it is an applescript (at the time of writing) that may be of assistance:

Indesign add measurements – Dr Scripto

I don't know of any other "off the shelf" solutions that are already prepared and in the public domain.

If the answer wasn't in my post, perhaps it might be on my blog at colecandoo!
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 Beginner ,
Apr 26, 2019 Apr 26, 2019

Hi Colin,

I did find Dr. Scripto's measurement tool. I also reach out to him but have not heard back.

Would either of you, Colin or Stefan be interested on build a script. 😃 I'm sure we could come to some agreement.

I really would need a tool like this but doing it myself would take way too long or probably would not happen at all.

Let me know what you think.

Thanks, Julian

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

I'm looking to upgrade my draw measurement scripts, but it is a side project and is on the backburner for now as I'm swamped with projects. That said, the task is not as straightforward as it seems, given the amount of scripting that can go into page geometry: http://www.indiscripts.com/blog/public/data/coordinate-spaces-and-transformations-5/CoordinateSpaces...

If the answer wasn't in my post, perhaps it might be on my blog at colecandoo!
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 Beginner ,
Apr 29, 2019 Apr 29, 2019
LATEST

Thanks Colin for the PDF. Will dig into it. I think Stefan might be able to help me with this project.

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