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.
Hi Luke, that's a very clever work-around. Thank you very much!
Hi Pixxxelschubser, thanks a lot - it worked! 😉
You are welcome.
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.
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
( ACP )
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.typename == "PathItem") ? new UnitValue(sel.length, "pt").as("mm").toFixed(2) + " mm" : "wrong selection");
Otherwise this one-liner is sufficient.
alert(new UnitValue(app.activeDocument.selection.length, "pt").as("mm").toFixed(2) + " mm");