Highlighted

Lenght of a path

New Here ,
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

107

Likes

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

Lenght of a path

New Here ,
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

108

Likes

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
Nov 16, 2020 0
Adobe Community Professional ,
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

Likes

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
Reply
Loading...
Nov 16, 2020 0
New Here ,
Nov 16, 2020

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Nov 16, 2020 0
Most Valuable Participant ,
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

Likes

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
Reply
Loading...
Nov 16, 2020 2
New Here ,
Nov 16, 2020

Copy link to clipboard

Copied

Hi Pixxxelschubser, thanks a lot - it worked! 😉

Likes

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
Reply
Loading...
Nov 16, 2020 0
Most Valuable Participant ,
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.

Likes

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
Reply
Loading...
Nov 16, 2020 0
Adobe Community Professional ,
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 )

Likes

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
Reply
Loading...
Nov 16, 2020 1
Most Valuable Participant ,
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

😉

Likes

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
Reply
Loading...
Nov 16, 2020 0