Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: tortoise on March 19, 2013, 05:17:35 PM

Title: Dynamic connector with multiple independent labels
Post by: tortoise on March 19, 2013, 05:17:35 PM
Hi,
I am trying hard to find how to create a connector that will allow me to do the following
1). Display several labels (at least 2, preferably 3)
2). All labels are editable
3). Labels can be positioned independently
4). The labels follow the connector if it moves or rotates
5). Works with Visio 2010 pro

The ideal solution would be to create more labels that behave exactly like the single built in label that can be positioned with the yellow dot.

The reason to want this is so when drawing network diagrams the end points can be labelled with information such as interface & ip address and that the labels will stay associated reasonably if the network nodes need to be moved to accommodate additional devices & connections.

I have been searching for an answer to this for some time & I have tried to follow various suggestions on line without success. The suggestions have either been too complex for me to understand or the resulting labels can't be edited or the labels do not follow the line well enough to be useful.

I have upgraded my Visio to 2010 pro specifically to try & get this to work.

Recently I have been looking at these posts & articles which seem relevant (perhaps)
http://visguy.com/vgforum/index.php?topic=4017.msg15689#msg15689
http://www.visguy.com/2010/02/09/text-along-a-connectors-path-in-microsoft-visio-2010/
http://visguy.com/vgforum/index.php?topic=1651.msg7116#msg7116
http://blogs.msdn.com/b/visio/archive/2007/03/23/where-s-my-text-control-handle.aspx
http://msdn.microsoft.com/en-us/library/office/aa200978(v=office.10).aspx
http://www.visguy.com/2009/05/06/top-twelve-text-tips/ (section 12)
http://office.microsoft.com/en-gb/visio-help/show-ip-addresses-and-other-information-on-your-visio-network-diagrams-HA010151543.aspx

Any pointers in the right direction would be most welcome please.
I am a noob so I may be missing the obvious.
Title: Re: Dynamic connector with multiple independent labels
Post by: Paul Herber on March 19, 2013, 05:45:17 PM
Please have a look at my http://www.sandrila.co.uk/visio-sdl/ (http://www.sandrila.co.uk/visio-sdl/), download and install the msi file, in the System Agent stencil you will find a shape called Channel. This should do the job for you.

Paul (also in Hampshire).

Title: Re: Dynamic connector with multiple independent labels
Post by: tortoise on March 19, 2013, 06:23:29 PM
Hi Paul,
thanks for your super fast response.

I have found the shape called channel & I see it has 5 yellow dots, one with text in.
It looks as if it will be ideal once I work out how to add text to the other labels.

Thanks very much for your help. I am amazed that this functionality is not part of every connector as I have never seen a detailed network diagram that dosn't need it. (Most people just add text boxes & hope they dont drift off).

Thanks.
Title: Re: Dynamic connector with multiple independent labels
Post by: tortoise on March 19, 2013, 06:53:45 PM
I am wondering if I have got the wrong end of the stick.
I can't find a way to add more than one label to the connector called channel having spent 20 mins trying every menu option & every combination of clicking I can think of.

I see the yellow handles & I suspect they may control the placement of text, but I have no idea how to edit that text to insert it.
Title: Re: Dynamic connector with multiple independent labels
Post by: Paul Herber on March 19, 2013, 07:03:58 PM
Oo-er, I think I might have given you some bad advice, that channel shape relies on the addon that goes with and the Gate Name and Signal shapes as well.
Sorry.
Title: Re: Dynamic connector with multiple independent labels
Post by: tortoise on March 19, 2013, 08:36:25 PM
ok Paul, that explains it. I was wondering if I might be going senile.

I will resume my search & post it here if I manage to find an answer.

Thanks
Title: Re: Dynamic connector with multiple independent labels
Post by: Jumpy on March 20, 2013, 07:51:04 AM
The way to do it yourself, in short steps as I have little time and no visio at the moment:

- Create a horizontal line
- Group it
- The group is now 2D, make it 1D (=connector) again (Behaviour)
- Add labels / textboxes as needed to the group
- In ShapeSheet add yellow control points to the groupshape
- In ShapeSheet of each label place formula in PinX/Y that looks at one of the Controlpoints
- Give the group the same geometry section the initial horizontal line has
- Delete the horizontal line shape from Group
- In ShapeSheet of Group Set ObjectType to 2(?) for dynamic connector
Title: Re: Dynamic connector with multiple independent labels
Post by: tortoise on March 20, 2013, 07:18:14 PM
Hi,
Thanks for such great help Jumpy. I am amazed that you can remember all that without having Visio in front of you.


I have added more detail to help other noobs & attached a simple connector based on this with just one label.
I may have messed up somewhere as it is not all quite right yet.
I will update this thread with a better version later.


For Visio 2010 pro - enable the developer tab first

- Create a horizontal line [home tab - to the right of the pointer tool]
- Group it [on home tab]
- The group is now 2D, make it 1D (=connector) again (Behaviour) [in developer tab]
- Add labels / textboxes as needed to the group [home/text OR insert/textbox then home/add to group]
- In ShapeSheet add yellow control points to the groupshape [in tab "shape sheet tools design" insert section controls then selet new control in shapesheet & use insert row and move the yellow handles so they are where you want them]
- In ShapeSheet of each label place formula in PinX/Y that looks at one of the Controlpoints [e.g =Sheet.5!Controls.Row_1.XDyn]
- Give the group the same geometry section the initial horizontal line has [insert geometry section & copy values from line]
- Delete the horizontal line shape from Group [take care to select original line, not new group, then delete]
- In ShapeSheet of Group Set ObjectType to 2 for dynamic connector [in Miscellaneous - ObjType]


Many thanks.




Title: Re: Dynamic connector with multiple independent labels
Post by: tortoise on March 21, 2013, 07:37:20 PM
I have made a bit more progress with this today & managed to create a connector with two lables each with a handle, however when the connector is set to be curved then the handle moves at both ends which ever end of the connector is moved.

The built in handle/text does not do this & I am working to try & understand why. I suspect it is connected with the Text Transform details.

I also have another weirdness with the curved connector in that it gets more bend handles every time i bend it.

Any hints welcome please.
Title: Re: Dynamic connector with multiple independent labels
Post by: Jumpy on March 22, 2013, 07:25:26 AM
The built in label is controled by Visio in some built in mystery algorythm I'd guess.
What happes to your labes or to your control points depends on the formulas inserted there.

Graham Wideman uses in his book a technic with placing two connection points near the end of the connector. When the connector is moved or resized, Visio calculates the position of the connection points automatic new. This way you can use those connection points to anker your labels.
Title: Re: Dynamic connector with multiple independent labels
Post by: tortoise on March 22, 2013, 02:11:04 PM
Thanks for your help again Jumpy. I have tried to follow up the idea of using additional connection points, but I am now hopelessly out of my depth unfortunately.
It is frustrating that MS have implemented the built in label in a way that can't be copied. Perhaps they have used "...some built in mystery algorithm..." as they were unable to define it in the shape sheets either.

When I got my company to pay hundreds of pounds for me to upgrade to Visio 2010 pro I thought I would at last be able to draw network diagrams with it, I didn't dream how incredibly difficult it would be to create a connector with labels that behaves in a useful way.

It seems that a lot of people use diagraming tools to document what they already have laid out in their head, so the layout doesn't change that much during the construction of the diagram.  My brain doesn't work like that & I expect to add each device & connector one by one. This always leads to rearranging the diagram lots of times, which is why for me it is essential for the labels to move dynamically with the connector, but not get repositioned without need. (e.g. if the left end of the line changes then the right end label should not move).

If anyone is familiar with the now defunct NetViz product, its connector labels worked well.

I am beginning to suspect that a Visio solution is not practical or I guess I would have found some examples on line by now. I can tell from my research that this question has been asked plenty of times before so it would just seem that no one has managed to find a solution.

Thanks for listening to my ramblings.
Title: Re: Dynamic connector with multiple independent labels
Post by: Jumpy on March 22, 2013, 03:48:16 PM
Maybe Al Edlund has some insights as he uses Visio for Network diagramming.

What I understand from your "ramblings" it would be helpful if a label would be positioned relative to the BeginX/Y or EndX/Y because BeginX doesn't change if you move the End of the line.
Title: Re: Dynamic connector with multiple independent labels
Post by: tortoise on March 22, 2013, 04:54:44 PM
I guess it needs to take some concideration of rotation of the line which is sort of "the other end moving"

Title: Re: Dynamic connector with multiple independent labels
Post by: Yacine on March 22, 2013, 06:00:18 PM
Had some time to play, so I put Jumpy's advice in a shape!
Title: Re: Dynamic connector with multiple independent labels
Post by: tortoise on March 22, 2013, 06:07:13 PM
Wow,
you guys must be some sort of Visio gods.

I had pretty much convinced myself that this was impossible.
Unfortunately I won't get a chance to look at this properly until Monday but thanks ever so much your help here.

I suspect some of these connectors may go viral with millions of people downloading them ;)

thanks again.
Title: Re: Dynamic connector with multiple independent labels
Post by: mswally on August 08, 2013, 10:00:26 PM
I've been looking for a very very long time now to find a good example of a connector with labels at each end, mainly to connect 2 network devices and specify the interfaces at each end.

This topic has actually been my best luck so far and it gave me a few other ideas. Instead of trying to add multiple labels on a single connector I thought I'd add several smaller connectors on top of each other. So now I just have to take care of the positioning of the connectors instead of adding the labels which seems a bit easier. I've attache the smaller labels on top of the master connecter using connection points but maybe there's an easier more dynamic way of doing this.

It's still not perfect, specially for curved lines, but it works for me. Perhaps someone could optimize it, perhaps giving the distance as a parameter and use data fields as input.

The example VSD is added (visio 2010)

Title: Re: Dynamic connector with multiple independent labels
Post by: kaage on August 28, 2013, 11:48:02 AM
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAWWWsome!!!!!!!!!!!!!!!!!!!!!! :) :) :D :D :D

Tried to achieve this for 4 years with collegues!
Title: Re: Dynamic connector with multiple independent labels
Post by: wmarler on September 25, 2013, 03:29:29 PM
Is it possible to tie shape data into these connectors?

So for example, in mswally's attachment the connectors have the shapedata "textleft" and "textright", but these don't tie into the labels "LEFT SIDE" and "RIGHT SIDE" respectively.
Title: Re: Dynamic connector with multiple independent labels
Post by: robert.cowham on October 09, 2013, 09:25:08 AM
I have used some information gleaned from Graham's books to create a connector where the port labels are driven from shape data and can also be turned on or off, dragged and respositioned manually if desired etc.

Check out http://www.squaremilesystems.com/products/sms-visio-utils/network-connector/

It is working pretty well.

Behind the scenes it uses the built in magic functions _UCON_BEGTYP and _UCON_ENDTYP to decide if a connector is going from left/righ/top/bottom and to the same. It then repositions the port labels automatically.
Title: Re: Dynamic connector with multiple independent labels
Post by: tommy1234 on October 25, 2013, 02:10:32 PM
I downloaded the connector Yacine posted.  How do I change it to a straight line style? Sorry if this is obvious, I'm quite new to Visio and it is not intuitive for me.
Title: Re: Dynamic connector with multiple independent labels
Post by: ondrugs on January 08, 2014, 11:24:38 AM
Right click - Straight Connector.
Title: Re: Dynamic connector with multiple independent labels
Post by: ondrugs on January 08, 2014, 11:26:24 AM
MSWally - thanks for the upload. it's exactly what I was trying to [unsuccessfully] do!

one thing i can't figure out, is how to save the connector as a stencil. i tried "save as", but all it ends up doing when i load the stencil, is be a standard connector (i.e - the labels disappear).

any thoughts?
Title: Re: Dynamic connector with multiple independent labels
Post by: duzhev on August 11, 2014, 08:55:27 AM
I installed a SMS Visio Utils (Visio 2013), but I can't find network connector.
As to me to start using network connector from http://www.squaremilesystems.com/products/sms-visio-utils/network-connector/.
What do I do not so?
Title: Re: Dynamic connector with multiple independent labels
Post by: glenn59 on January 04, 2016, 09:54:24 PM
Is it possible to add a third label near the center? And how?
Title: Re: Dynamic connector with multiple independent labels
Post by: Yacine on January 05, 2016, 06:30:59 PM
Hi Glenn,
in the examples posted earlier, there is already a 3rd label. Where is the problem?
Title: Re: Dynamic connector with multiple independent labels
Post by: glenn59 on February 04, 2016, 08:43:23 PM
Sorry Yacine.. I saw the third label on the curved connector only, not realizing it could be changed to a right angle as another poster mentioned. Now, I just need to change the fill to white and text to black. This could be a fantastic solution for me! Thanks so much!
Title: Re: Dynamic connector with multiple independent labels
Post by: netwiz on April 14, 2016, 01:56:28 PM
Hi Viso people!

I'm trying to create two connectors with three labels one as a curve and one as an arc, using the examples provided in this thread. Ultimately these will be used to help documenting data flows between systems, linking to a spreadsheet.....

I'm almost there!

The curve connector is close, all I need to do is get the centre label to be restricted to stay on the curve line

The Arc connector also needs to be restricted to the line and I cannot get the label to sit on top of (forward) of the line.

Would greatly appreciate any assistance!

See the attached file.... 
Title: Re: Dynamic connector with multiple independent labels
Post by: vojo on April 14, 2016, 03:25:11 PM
I have always had problems with the UI tools for arcs...so I made arcs using
parametric inputs (type values to define "curviness")

You may be able to use these to define reference points for your text box
(since the parameters are crisply defined...maybe some sequence of formulas can get you what you want....maybe like x = width * 0.5   y = height + user.arcness)
Title: Re: Dynamic connector with multiple independent labels
Post by: Yacine on April 14, 2016, 03:58:48 PM
Hi Netwiz,
I recalled having seen something similar in the forum ... and Google is your friend: "NEARESTPOINTONPATH site:visguy.com"
--> : http://visguy.com/vgforum/index.php?topic=6279.0
Check the attachment of reply #7 by Nikolay

Regards,
Y.
Title: Re: Dynamic connector with multiple independent labels
Post by: netwiz on April 18, 2016, 12:15:54 PM
Thanks for the pointers guys!

Will investigate......