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

Lenght of a path

New Here ,
Nov 16, 2020 Nov 16, 2020

Copy link to clipboard

Copied

Hi all! I wonder if there is way of measuring the total lengt of path in Adobe InDesign - not the outer box dimensions nor the x/y-positions.
To make it clear: I was creating a new racetrack layout (true-to-scale) and now I have to know how many meters of barriers are needed to build it.
Many thanks in advance, Ralf

TOPICS
How to

Views

327

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 2 Correct answers

Community Expert , Nov 16, 2020 Nov 16, 2020

I don't know if there is a way to get the exact length of a line, but you could create a dashed line, count the dashes and gaps and multiply by the scale factor of your drawing, which should give you a ballpark number.

line length.png

Votes

Translate

Translate
Community Expert , Nov 16, 2020 Nov 16, 2020
A thought:
Why not do your drawing in Illustrator? There you have a lot more options for creating and editing.
 
If you don't want to design it entirely in Illustrator, you can find the length of the path there in a very simple way:
  • copy your path in InDesign
  • paste it in Illustrator (set the ruler to the wished unit)
  • release the clipping mask and select only your path (or select your path directly with the Group Selection Tool)
  • open the Attributes palette - Document Information tab (Options: O
...

Votes

Translate

Translate
Community Expert ,
Nov 16, 2020 Nov 16, 2020

Copy link to clipboard

Copied

I don't know if there is a way to get the exact length of a line, but you could create a dashed line, count the dashes and gaps and multiply by the scale factor of your drawing, which should give you a ballpark number.

line length.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
New Here ,
Nov 16, 2020 Nov 16, 2020

Copy link to clipboard

Copied

Hi Luke, that's a very clever work-around. Thank you very much!

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 ,
Nov 16, 2020 Nov 16, 2020

Copy link to clipboard

Copied

A thought:
Why not do your drawing in Illustrator? There you have a lot more options for creating and editing.
 
If you don't want to design it entirely in Illustrator, you can find the length of the path there in a very simple way:
  • copy your path in InDesign
  • paste it in Illustrator (set the ruler to the wished unit)
  • release the clipping mask and select only your path (or select your path directly with the Group Selection Tool)
  • open the Attributes palette - Document Information tab (Options: Objects)
 
path_length_in_Illu_from_InDesign.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
New Here ,
Nov 16, 2020 Nov 16, 2020

Copy link to clipboard

Copied

Hi Pixxxelschubser, thanks a lot - it worked! 😉

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 ,
Nov 16, 2020 Nov 16, 2020

Copy link to clipboard

Copied

You are welcome.

 

One sidenote:
Supposed the path is your racetrack - your barriers are some distance from the track. Use in Illustrator the menu: Object -> Path -> Move Path (your distance in correct proportion) to create a second path with the correct distance. Find the length of this second path. This length will be much more accurate.

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 ,
Nov 16, 2020 Nov 16, 2020

Copy link to clipboard

Copied

Hi Ralf,

see this thread where the problem is discussed and solved with a script by Loic Aigon:

 

[CC 2018][JS] How to get length of path
tmmls, Jan 25, 2018

https://community.adobe.com/t5/indesign/cc-2018-js-how-to-get-length-of-path/m-p/9637665?page=1#M856...

 

Regards,
Uwe Laubender

( ACP )

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 ,
Nov 16, 2020 Nov 16, 2020

Copy link to clipboard

Copied

Hi Uwe,

a very good solution by @Loic.Aigon (as always)

 

But ufff … so much maths required …

Illustrator as Graphic Program does the same with a small two-line script (include a little error management):

 

#target Illustrator

// pathItem_get_length_of selected_path.jsx
// please select only one path item
// regards pixxxelschubser 16. Nov. 2020

var sel = app.activeDocument.selection;
alert ((sel.length != 0 && sel[0].typename == "PathItem") ? new UnitValue(sel[0].length, "pt").as("mm").toFixed(2) + " mm" : "wrong selection");

 

 

Otherwise this one-liner is sufficient.

alert(new UnitValue(app.activeDocument.selection[0].length, "pt").as("mm").toFixed(2) + " mm");

 

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
Mentor ,
Nov 16, 2020 Nov 16, 2020

Copy link to clipboard

Copied

https://community.adobe.com/t5/indesign/cc-2018-js-how-to-get-length-of-path/td-p/9637665?page=1

Remember, never say you can't do something in InDesign, it's always just a question of finding the right workaround to get the job done. © David Blatner

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 ,
Nov 16, 2020 Nov 16, 2020

Copy link to clipboard

Copied

Hi @Geоrge 

also a good answer (but this script/thread was already mentioned here by @Laubender in post #6)

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 ,
Nov 22, 2020 Nov 22, 2020

Copy link to clipboard

Copied

LATEST

@Ralf Steinert wrote: "Hi Pixxxelschubser, thanks a lot - it worked! 😉"

 

It seems that the problem is solved - is it?

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