BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Text Along a Connector’s Path in Microsoft Visio 2010

Started by Visio Guy, February 09, 2010, 07:47:41 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Visio Guy

For articles, tips and free content, see the Visio Guy Website at
Get my Visio Book! Using Microsoft Visio 2010


Nice.   Any thought about how to offset this above/below line.   aka does the text transform act based on position on this path construct?
Any thought to intelligence....above or below based on angle or position?

Visio Guy

Shouldn't be hard at all. That User.angPathEnd cell will tell you what the outgoing angle is at the end of the path. Moving the TxtLocPinY cell to the top or bottom of the shape, depending on the angle, should get your text block properly offset from the line.

The Text Transform section has some logic that I didn't talk about in the article, but you should be able to get what you need without too much tweaking.
For articles, tips and free content, see the Visio Guy Website at
Get my Visio Book! Using Microsoft Visio 2010


I have a serious use case for dual text boxes positioned at the ends.

I'm currently putting together a drawing of multiple microwave tower sites. Each site has a transmit frequency (Tx) that is matched by a receive frequency (Rx) on the other end. The other end has Tx & Rx to match.

I'd like to be able to show frequencies on both ends of the connector. I'll be retrieving frequency info from shape data using fields.

Any insight?



so do the following:

1. get a connector you like
2. add 2 boxes (format as you want....clear, etc)
3. group them
4. go into each box shape sheet and ref pinx, piny to one end of the group shape....something like start box  has group pinx*0+ offset...end box has group pinx*1 - offset
5. set group behavior as a 1D shape.

So now can move the hands and connector ends track to them....boxes offset from end/begin of the connector
Add text either by text in the box or via custom prop and use insert field to put prop in text in box.

if the connector is complex (sort of an S)...can add control points to move the middle segment(s) around.


Thanks for your input.
I tried a similar solution, but can't seem to get the text boxes to pull shape data from the connector line (Shape Data is blank on the Insert Field Dialog Box).

What is the significance of a shape's text box? Can that box be duplicated or imitated?



you could ad a User defined cell to each textbox shape, where you reference the ShapeData cell from the connector.
For example, if Connector is Sheet.123 and the Name of the ShapeData is Textbox1sText you could create the cell:
as it's formula.

Then in the insert Field dialog you don't go to the ShapeData but to the user defined cells.


Thanks, Jumpy.
I'm curious... how scalable is your solution? I have hundreds of connectors to do. :-)

Thanks again,


You only do it one time and so create a new master. Put that in a stencil and use it from now on to get new connectors to connect your shapes.

Or didn't I unserstand the question?


Using the new shape as a stencil makes sense.
I was more concerned with scaling the shape data connections. I need to link each connector to a line of an external data source. Will this still work?

Thanks again,


Can't say, but an example from one of my solutions.

I use Shapes on a background page as containers for words of different languages.
On the page I select a language. That influences from which (language-container)Shape my shapes got their text.

At the moment this supports only 6 languages, so only 6 shapes are conneted with an external data source.
So there is no information concerning your original question about the number of possible shapedata connections, so I guess it's big.

But - and thats the point - my vocabulary consists at the moment of perhaps 600 words, so 600 ShapeData values in one shape are connected or updated with an external Data Source without problems.


Forgive me if this has been covered but I cant locate:
I can now adjust text to be at either end or middle by hacking the ANGLEALONGPATH(Geometry1.Path,X)
Where X=1 gives arrow end, 0.5 gives middle and something like 0.1 gives the start end .. all very nice
Can (sort of) even follow the code example to give these menu options ...


(1) I need the "text" to be an importable data field (data graphic) ... how?
(2) I'd like THREE bits of data graphic text: start, end, middle .. is possible? How?

Many many thanks for any suggestions


Oh dang! ... forgot one:
(3) is it possible to change the alignment of the text (left to right etc.) such that of the text is quite long, it doesn't run off the end of the connector? IE tie its position to the leftmost or rightmost char of the text string?


Would it be possible to create a control who's X & Y Behavior were set using the POINTALONGPATH and the ANGLEALONGPATH commands? So that the control always tracks on the line?

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 372 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1230KB.
Tokens: post-login.
Cache hits: 13: 0.00188s for 26,764 bytes (show)
Cache misses: 2: (show)
Queries used: 16.

[Show Queries]