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
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.
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.
Copy link to clipboard
Copied
Hi Luke, that's a very clever work-around. Thank you very much!
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi Pixxxelschubser, thanks a lot - it worked! 😉
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.
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
Regards,
Uwe Laubender
( ACP )
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
😉
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
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)
Copy link to clipboard
Copied
@Ralf Steinert wrote: "Hi Pixxxelschubser, thanks a lot - it worked! 😉"
It seems that the problem is solved - is it?