Visio Guy

Visio Discussions => General Visio => Topic started by: hidden layer on July 12, 2022, 11:30:05 AM

Title: gluing lines at connection points
Post by: hidden layer on July 12, 2022, 11:30:05 AM
Hello,
Remark: because I'm using German Visio (2016 professional) maybe some terms are not the correct ones - sorry for that.

I have some shapes copied from a drawing and put some connection points at it. In Visio 2010 I could transform them to lines and texts but in 2016 they are just shapes.

I'm facing a problem by connecting two of these shapes with lines. My experience with 2010 pro was that once connected the lines keep connected when a shape is moved.
Now (with 2016 pro) straight lines keep connected but lines in a zig-zag-shape doesn't.

While hovering over the starting connection point the comment shows up 'glue to connection point'; hovering over the 2nd connection point the comment shows up 'align to connection point'.

ok, the connectors doesn't face this problem and looks the same but I'm unable to make the connectors going the shortest way but it goes strange ways: I want them to go in one direction only (e.g. downwards) but they goes left or right. I can manually force them to stay in the wanted way but after moving the shapes they goes like they want. That's why I used lines instead.

Is it possible to glue lines at two shapes or not?

Is it possible to force connection lines (or connectors?) in one direction only?

What is the difference between 2010 and 2016 handling these drawings I paste into Visio?
The origin is some schematic made by E3-series.

Is it possible to have Visio 2010 and 2016 in parallel at the same PC?

Thanks for all hints, guides or workarounds.

Peter
Title: Re: gluing lines at connection points
Post by: Surrogate on July 12, 2022, 12:55:09 PM
Quote from: hidden layer on July 12, 2022, 11:30:05 AM
Is it possible to have Visio 2010 and 2016 in parallel at the same PC?
Hi, Peter !

6 years ago I needed to have 2 versions of 2010 and 2016 on my computer. the company had licenses for both versions with the MSI installer. The administrators said that this was not possible. They made me a virtual machine with the 2016 version.
I do not know about MSI/Click-to-run compatibility.
Title: Re: gluing lines at connection points
Post by: hidden layer on July 12, 2022, 01:07:36 PM
Quote from: Surrogate on July 12, 2022, 12:55:09 PM
MSI/Click-to-run compatibility.

What do you mean precisely?

Before installation of Office 2016- I was forced to uninstall 2010.

cheers
Peter
Title: Re: gluing lines at connection points
Post by: Surrogate on July 12, 2022, 02:45:46 PM
Quote from: hidden layer on July 12, 2022, 01:07:36 PM
Before installation of Office 2016- I was forced to uninstall 2010.
IMHO in this case only a virtual machine
Title: Re: gluing lines at connection points
Post by: hidden layer on July 12, 2022, 05:15:19 PM
ok - e.g - not ok.

I'll wait for answers to other questions.
Either going back to 2010 or installing on another PC. What a mess...

For Excel 2016 are lots of functionalities that are benefits to 2010 but for Visio I cannot see some improvements - I use it for some weeks only. Just the vsdx-files that are common inbetween.

Thanks
Peter

Title: Re: gluing lines at connection points
Post by: Surrogate on July 12, 2022, 06:03:23 PM
Peter, you can downgrade only Visio. And still use Office 2016.
Title: Re: gluing lines at connection points
Post by: wapperdude on July 12, 2022, 08:46:50 PM
Yes, you can glue a line between two shapes.  This is normal behavior for all versions of Visio.  You may have to set gluing permissions, though.

Go to the View tab on the ribbon, and click Visual Aids.  Make sure that Gluing is enabled for connection points.  You can also enable gluing to geometry which avoids needing connection points.  Then you can either draw a line and drag it such one end glues, and then stretch the line such that it glues to next shape, or, if the line is exact length, drag it and both end glue at same time, or, finally, use the line tool (or pencil) and draw line from one connection point to the other. 
Title: Re: gluing lines at connection points
Post by: hidden layer on July 13, 2022, 05:44:06 AM
Hi wapperdude,
following these rules doesn't change anything. To illustrate this - see attachment. Maybe some misunderstanding?

I found out that at company's PC I have Plan 2 (instead of 2016 that was advertised).

At my PC I have Visio 2016 MSO (16.0-4255.1001) 64 Bit.

cheers
Title: Re: gluing lines at connection points
Post by: wapperdude on July 13, 2022, 11:23:10 PM
Thanks for the file upload.  I was able to confirm the problem.  I do not see any way to make a line with bends to glue both ends.  In fact, if you pre-draw the line and then try to glue the ends, neither end seems to glue.  So, it doe look like M$ broke this.

There is a work-around.  First, draw a straight line such that both ends are glued.  Then, switch to the pencil tool.  With the line selected, hover mouse, then hold <cntl> down and left click mouse  over the line at some point  This insert a deflection point which you can then drag to some location desired.  This will add a corner.  Both line ends remain glued.

HTH.
Title: Re: gluing lines at connection points
Post by: vojo on July 14, 2022, 12:47:26 AM
would not the following work

1)  manually add connection points (in essence, June family of lines)
- take a line, any sort of line.
- explicitly add connection points at the ends
- now connect the connection  points to to some other shape or line with connection points

2) not for the novice
- take a line any line.
- in the geometry section row that ends the line  use LoctoLoc function to make that line end locate in another shape.
  the loctoloc will hold the line against where that other shape regardless of where this line moves to

Title: Re: gluing lines at connection points
Post by: hidden layer on July 14, 2022, 06:04:23 AM
Good morning and thanks for the hints!

The pencil thing really works but I have to say something more about my target. In my company (for whatsoever reasons) schematics will not be drawn that anyone can see a function. Some say 'to confuse the Russian'. So I redraw these schematics partially to make a function or dependency visible in order to let others understand.
That requires a constantly moving of the schematic's elements until the visibility of a function is clear. These schematics are sometimes very complex.
Usind the schematic's snippets (which I can't transform to lines and texts with Visio 2016 at all - another thing)- I thought I can shortcut (!) something.

Back to the pencil- thing - if there's a zig-zag-line - it's true the line stay glued but looks funny after moving something. But thanks!

Hi vojo,
the 1st hint is similar to wapperdude's workaround , the 2nd is a bit strange I learned here (http://visguy.com/vgforum/index.php?topic=158.0).
Interesting function but ... let's say: not now.

I'll use my old tool (http://visguy.com/vgforum/index.php?topic=8963.0) (even if I don't use the whole functionality) instead. The connection points in this tool I made that they'll go outwards only (as opposite to go right or left).
Ok, I have to redraw its connection lines anyway but it's faster than try to understand LocToLoc completely. ;)

But thanks for this hint as well!

cheers!
Title: Re: gluing lines at connection points
Post by: Yacine on July 14, 2022, 06:13:23 AM
Hi Peter,
your problem is that you tried to glue a 2D shape to 2 points. This can't work (and shouldn't).


I commented your drawing and added some examples on how you can do it right.
Title: Re: gluing lines at connection points
Post by: hidden layer on July 14, 2022, 07:15:41 AM
Hi Yacine, you're right.

i'm not going to be an expat with Visio ;) but I try to get better day by day.
see attachment.
Title: Re: gluing lines at connection points
Post by: Yacine on July 14, 2022, 10:46:44 AM
Your connectors do exactly what they are expected to.


In your circle case, make sure to define the dirx and diry.


For the connectors going to the switches make sure to snap to connection points.


(mühsam ernährt sich das eichhörnchen  ;) )
Title: Re: gluing lines at connection points
Post by: hidden layer on July 26, 2022, 01:36:36 PM
Hi Yacine.
I'm back from holiday and started to find symbols shown at your 'Unbenannt2' pic.
I didn't found it. In German it should be called Verbinder? Which menu?
(as this forum seems to be the only one that can regarded seriously - maybe I shall switch the program's language to English... I'll think about that)

The thing with the dirx/diry I found out how this works. Thanksalot!

But if I change Type/C to outward I'm not able to place a connection line to the symbol at all. I expected the 'logic' behind 'inward' and 'outward' (0;1) exactly the other way round. That's funny, isn't it?

"kaum macht man alles richtig - schon funktioniert's
Title: Re: gluing lines at connection points
Post by: Yacine on July 26, 2022, 05:00:16 PM
Hi HiddenLayer,
welcome back.

You could not find the menu of the 2nd picture, because it is one I customized myself.
Till Visio 2007 the smart icons where organized logically and you knew where to look.
Those ribbbons are really bad.

I enclose this menu as attachment, so you won't need to search for too long.
Title: Re: gluing lines at connection points
Post by: Yacine on July 26, 2022, 05:12:18 PM
As for the connection types, their behaviour is logical too.

Type 0 is for incoming connections. That is when a connector (or a 2D-Shape) tries to connect to myself. With the DirXY fields I tell it to orient itself according to my values.

Type 1 is when I (shape) try to connect to another shape. That is, I orient myself according to DirXY.
When such a point is set to 1 it won't function as connection point for connectors trying to connect to myself.

Type 2 is the combo of 0 and 1. ( 0+1 = 2 ;D )

I updated your drawing with the yellow and blue discs. They show the a.m. described behaviour.
Try pulling separately a yellow or a blue one to see the gluing.
Take a blue one by either its left or right side and try gluing it on the right or the left side of a yellow disc.

I hope it is somewhat comprehensible.

Y.
Title: Re: gluing lines at connection points
Post by: wapperdude on July 26, 2022, 09:53:33 PM
Here is formal definition of DirX,Y funcionality:
"In non-extended rows the DirX and DirY cells together define a direction vector that influences the rotation of shapes involved in connections using the connection point. If both are zero the point is directionless. Connection points are of the following types:

Inward (0), which means that shapes glue to them. This is the default.

Outward (1), which means these connection points will glue to inward connection points.

Both inward and outward (2), in which case the direction is the inward direction, which is reversed if used as an outward connection."

See this for more info:  https://docs.microsoft.com/en-us/office/client-developer/visio/connection-points-row-connection-points-section (https://docs.microsoft.com/en-us/office/client-developer/visio/connection-points-row-connection-points-section)
Title: Re: gluing lines at connection points
Post by: Yacine on July 27, 2022, 09:48:44 AM
Thank you for tidying up. ;)
Title: Re: gluing lines at connection points
Post by: hidden layer on July 27, 2022, 12:08:15 PM
Hi,
thanks so far. I didn't got the whole story but I can work with.

I read those articles at MS but there's something that I don't understand completely:
at https://www.oreilly.com/library/view/microsoft-visio-2013/9783848330416/ch15s16.html (https://www.oreilly.com/library/view/microsoft-visio-2013/9783848330416/ch15s16.html) is listed that these values (DirXY) are for dynamic connectors only and size doesn't matter. But it does as I experienced).

at https://docs.microsoft.com/de-de/office/client-developer/visio/dirxa-cell-connection-points-section (https://docs.microsoft.com/de-de/office/client-developer/visio/dirxa-cell-connection-points-section) it is mentioned that these two values give a vector.
But there is no vector (aside from top, bottom, left or right).
the rare information there is really MS-like.  >:(

This gluing shapes (your circles Yacine) together is currently not in my focus.

Let's go to a specific problem:
I have a vertical line.
At the top of this line have a connection point.

Regardless of the values for DirX, DirY and type the connector goes to the left or to the right - just from where the connector comes. Only if the other end of this connection line is almost precisely over this line it goes upwards.
Even if I give 0 to x and a million to y (which is the mathematically correct way imho) it goes left or right.

It seems to be impossible to force the direction of a connector that this goes upwards first and after a (specific?) distance sidewards. (I use static connectors only - from connection point to connection point).

as a workaround I replaced these lines with rectangles (with a connection point in the upper middle) , set GlueType to 8 and this works. The funny thing is if I give 1 to DirY it goes downwards, at -1 upwards. What strange logic behind?

You see I have lots of fun here.

Thanks for any hint

cheers!
Title: Re: gluing lines at connection points
Post by: Yacine on July 27, 2022, 12:58:36 PM
Quote from: hidden layer on July 27, 2022, 12:08:15 PM
...
Let's go to a specific problem:
I have a vertical line.
At the top of this line have a connection point.

Regardless of the values for DirX, DirY and type the connector goes to the left or to the right - just from where the connector comes. Only if the other end of this connection line is almost precisely over this line it goes upwards.
Even if I give 0 to x and a million to y (which is the mathematically correct way imho) it goes left or right.

It seems to be impossible to force the direction of a connector that this goes upwards first and after a (specific?) distance sidewards. (I use static connectors only - from connection point to connection ...

Can you upload a drawing?


Maybe we need to transform the line into a 2D-shape.
Title: Re: gluing lines at connection points
Post by: hidden layer on July 27, 2022, 01:23:56 PM
Hi,

here it is. Thank you!
Title: Re: gluing lines at connection points
Post by: Yacine on July 27, 2022, 01:52:25 PM
Hi,
The edge points can't have a vertical and a horizontal orientation at the same time. You need to chose one. May be you could put two points close the edges and then choose one of them.

But the group shape itself did not have any connection point anyway. I don't know what you were expecting.

I added the missing points. cf red connection-shape.


----


I'm going to ask for a payment if it continues this way  ;) . (Maybe a donation to Chris' forum)
Title: Re: gluing lines at connection points
Post by: hidden layer on July 27, 2022, 02:09:49 PM
Hi Yacine, thanks for your patience,

Ok, I'm fine with one direction only. Left to left, middle to top etc.

The group does not have connection points because the group ist just the frame of the 'terminal' the symbol is representing. It interacts in some bigger context (see here: http://visguy.com/vgforum/index.php?topic=8963.0 (http://visguy.com/vgforum/index.php?topic=8963.0)).

If some of the lines above is 'active' all lower lines become 'active' and connected lines transport this information to further participants. This was the result of some rainy weekends in a hotel. Not perfect but it works. Now I started to make it a bit more 'nice'- y'know.

As mentioned above I replaced the lines with rectangles (in almost the same size) and this works. I was just wondering about and try to get a clue out of it ;) For further experiences...

I read a lot of posts about this connecting thing but everyone who's asking run into the same situation that the did not get the system behind.

Does this answer your questions a little bit? Or at least make my nervous costume present?

again: Thanks!

Title: Re: gluing lines at connection points
Post by: hidden layer on July 28, 2022, 02:12:00 PM
hmmmm....

after fixing some problem I've illustrated to myself the behaviour and dependencies og th egluing angle of 2D-shapes.

For whom it may concern.

cheers & cu
hl