### Author Topic: Constant length of a line. withouth fixing start and end points.  (Read 5501 times)

0 Members and 1 Guest are viewing this topic.

#### kiler40

• Sr. Member
• Posts: 328
##### Constant length of a line. withouth fixing start and end points.
« on: February 22, 2013, 09:56:18 AM »
Hello All,
I`d like to ask if it is possible to make, for example two random shapes, draw a line that glues to both shapes, and after that fix this line length. But still i want be able to move shapes around but don`t allow them to change distance between them / this distance is the line/

Andrew

#### vojo

• Hero Member
• Posts: 1528
##### Re: Constant length of a line. withouth fixing start and end points.
« Reply #1 on: February 22, 2013, 10:24:16 AM »
why not just group the 2 shapes and line....you can move the group anywhere, and their relationships to each is maintained

#### kiler40

• Sr. Member
• Posts: 328
##### Re: Constant length of a line. withouth fixing start and end points.
« Reply #2 on: February 22, 2013, 11:26:06 PM »
I gave this example as a simple one. In my case i have lots of shapes that i need reorganize but keep distance between them.

#### wapperdude

• Global Moderator
• Hero Member
• Posts: 3833
• Ideas Visio-lized into solutions
##### Re: Constant length of a line. withouth fixing start and end points.
« Reply #3 on: February 23, 2013, 02:08:01 AM »
...and I suspect that using the align shapes and distribute shapes functions won't meet your needs either.  Somewhere, I vaguely remember reading something about spacing objects and paths...believe it was related to V2010.  Not sure it would be adaptable for your needs.

Setting a fixed line length is problematical in Visio.  A work-around that might be useful is as follows:
1.  Select the shape then right click > Format > behavior and set to 2-D.
2.  In the shapesheet use guard funciton to freeze the width and height.  This will fix the length and still allow your "line" to be moved and rotated.
3.  You may want to change the LocPinX cell to be width*0.  That way the line will pivot about the start point.

A problem with this approach is it makes glueing a little more difficult, but, workable.

HTH
Wapperdude
Visio 2019 Pro

#### Tegglet

• Jr. Member
• Posts: 10
##### Re: Constant length of a line. withouth fixing start and end points.
« Reply #4 on: October 06, 2013, 04:28:14 AM »
I have a different problem that would be solved by a floating line of fixed length.  However, I can't reproduce the navigation suggested - "Select the shape then right click > Format > behaviour and set to 2-D."  Right clicking Format does not give the option to change the behaviour.

I want to measure the four sides of an area and either of the diagonals then in Visio create five lines corresponding to the measured lengths.  Providing the length of the lines can be fixed they can be moved and rotated so their ends connect to form an accurate shape representing the measured area.  Easy to do on paper with a pencil and compass but not in Visio.

#### wapperdude

• Global Moderator
• Hero Member
• Posts: 3833
• Ideas Visio-lized into solutions
##### Re: Constant length of a line. withouth fixing start and end points.
« Reply #5 on: October 06, 2013, 01:33:40 PM »
I'm using V2007, but, I don't think this functionality has changed with the more recent releases.

So, with your line selected, right click should pop up a menu, mouse over Format.  Should bring up another menu, left click on Behavior.  Under Interaction style, select Box (2-dimensional).  Click OK
Visio 2019 Pro

#### Yacine

• Hero Member
• Posts: 2712
##### Re: Constant length of a line. withouth fixing start and end points.
« Reply #6 on: October 06, 2013, 04:14:33 PM »
To Kiler's question:
Using to the standard gluing tools, it wood be very limited.
I would suggest to set a special connector which would trigger a macro. That macro would write in the PinX and PinY fields a relation to the shape it is linked to. You would limit these values with some BOUND formula.
The connector would then just follow the two shapes without additional "smartness".
The so linked following shape, would probably need an action to unlink from it's parent.
Yacine