Visio Guy

Visio Discussions => General Visio => Topic started by: Jennifer on November 12, 2022, 09:18:35 PM

Title: Can I draw a curved line and see the length?
Post by: Jennifer on November 12, 2022, 09:18:35 PM
Is there a way to draw a curved line (arc, pencil, freeform) and then add a field that will show the length if it were straightened out?

I tried all three, but the length field is the length of the rectangle enclosing the string.
Title: Re: Can I draw a curved line and see the length?
Post by: wapperdude on November 12, 2022, 09:51:51 PM
Assuming you have V2010 or newer, there is pathlength shapesheet function.  See https://learn.microsoft.com/en-us/office/client-developer/visio/pathlength-function (https://learn.microsoft.com/en-us/office/client-developer/visio/pathlength-function)
Title: Re: Can I draw a curved line and see the length?
Post by: Jennifer on November 12, 2022, 10:25:40 PM
Quote from: wapperdude on November 12, 2022, 09:51:51 PM
Assuming you have V2010 or newer, there is pathlength shapesheet function.  See https://learn.microsoft.com/en-us/office/client-developer/visio/pathlength-function (https://learn.microsoft.com/en-us/office/client-developer/visio/pathlength-function)

I have updated my signature to show that I have Visio 2019.

I opened the shapesheet for the 3 curvy lines that I drew, but there was no Path field in the Geometry 1 section.

Undaunted, I added a field to each shape and entered this custom formula "=PATHLENGTH(Geometry1.Path)". Here's the result:

(https://i.postimg.cc/BZg6dV8R/image.png)

So it works! 👏👍🥰
Title: Re: Can I draw a curved line and see the length?
Post by: Jennifer on November 12, 2022, 10:39:32 PM
Curiously, I had to select the Number format and then "Feet and inches" to get any units to be displayed.

When I selected the General category and checked Show units, none were displayed.
Title: Re: Can I draw a curved line and see the length?
Post by: Jennifer on November 12, 2022, 11:02:36 PM
On the off chance that you might be interested in the application, here's a screenshot of the layout I created to see where we might want to put a home charging station for the electric vehicle we are looking into getting.

(https://i.postimg.cc/ZqWvZtBw/image.png)

I knew the the straight line distances were off, but I wasn't sure by how much. It's about 20%.

(https://i.postimg.cc/K8nsNwvs/image.png)

I think it's pretty cool! Thanks for the help.