Author Topic: Can I draw a curved line and see the length?  (Read 702 times)

0 Members and 1 Guest are viewing this topic.

Jennifer

  • Hero Member
  • *****
  • Posts: 553
Can I draw a curved line and see the length?
« on: November 12, 2022, 04: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.
Using Visio 2019, part of Office 365 on Windows 10

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4745
  • Ideas Visio-lized into solutions
Re: Can I draw a curved line and see the length?
« Reply #1 on: November 12, 2022, 04: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
Visio 2019 Pro

Jennifer

  • Hero Member
  • *****
  • Posts: 553
Re: Can I draw a curved line and see the length?
« Reply #2 on: November 12, 2022, 05:25:40 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

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:



So it works! 👏👍🥰
Using Visio 2019, part of Office 365 on Windows 10

Jennifer

  • Hero Member
  • *****
  • Posts: 553
Re: Can I draw a curved line and see the length?
« Reply #3 on: November 12, 2022, 05: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.
Using Visio 2019, part of Office 365 on Windows 10

Jennifer

  • Hero Member
  • *****
  • Posts: 553
Re: Can I draw a curved line and see the length?
« Reply #4 on: November 12, 2022, 06: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.



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



I think it's pretty cool! Thanks for the help.
Using Visio 2019, part of Office 365 on Windows 10