3-Label Dynamic Connector: Input Methods
Visio’s main forte is helping users to create connected diagrams, be they flowcharts, org-charts, network diagrams, software diagrams, wiring diagrams and more. There are several articles on this website that talk about Visio connectors in one way or another.
Maybe you’ve read or seen some of these:
- Text Along a Connector’s Path in Microsoft Visio 2010
- Making Bends in Visio’s Dynamic Connector
- Analyze Connectivity Between Process Flows
- Sample Banking Scandal Visio Flowchart
Feedback from these articles, along with various work I’ve done for custom Visio schematic diagramming solutions, got me thinking about producing a three-label connector, which I will soon release into the wild for a modest fee. Look for it on the Products page soon.
The goal is to enable users to label connectors something like this:
The text at one end of the connector reflects the terminal at the other end. This allows you to more easily read diagrams where connectors connect things that are far apart. I can see that terminal USB In 1 connects to USB Out without following the connector all the way to the other end. The middle text can then be used to add some extra information. Here we see that this should be a USB 3 cable.
I won’t go into how I actually built the connector to display three text blocks in this article. For you Visio-geeks out there, I’ll hint that ShapeSheet functions added in Visio 2010 make this much more do-able, although it wasn’t impossible in Visio 2007.
Instead, I’ll discuss the three methods I came up with for inputting the text.
One Delimited Text Block
When you’re editing the text in a Visio diagram, it can get a bit tedious to have to pick up the mouse, click on a shape, possibly enter text edit mode, then return to the keyboard to type. Doing that three times for each connector could get old.
So this first flavor allows you to type one block of text that holds the information for all three bits. You tell the shape which part of the text goes where by separating the three items with a semicolon. Click the connector, then type: USB Out;USB 3 Cable;USB In 2, and you’re done!
The other major trick with this shape is that the main text block is actually hidden. You only see the text when you’re typing. Thereafter, the ShapeSheet takes over, splits the text into pieces, and sends those pieces to the subshapes at the beginning, middle and end of the connector.
- Automatic Chevron Process Shape
- Design Web Pages With This Visio Breadcrumbs Shape
- Run Circles Around Your Text With the Circle-text Title SmartShape
- Repeating Diamond Title Visio Shape
Shape Data Fields
The second iteration lets you set the text using three Shape Data fields. This also allows you to stay at the keyboard, since you can Tab between fields.
For the shape pictured below, you need only select the shape, then click on the Text Begin field in the Shape Data window.
As long as your left pinkie knows where the Tab key is, you won’t have to leave the keyboard to finish editing all three text blocks. Just type value-tab-value-tab-value-enter and you’re done! Again, the ShapeSheet is wired so that the each text block reads one of the values in the Shape Data.
The third method is the most direct, but gets us back to the original complaint: three sets of clicking-on-a-shape, then returning to the keyboard to type.
I would argue that this is the simplest method, in terms of explaining it to novice users. They only have to learn how to subselect shapes. Simply put, you subselect shapes in a group by first clicking the “top-level” group shape, pausing for half-a-second, then clicking again on the subshape. Here we can see the middle text block is subselected. Don’t worry about craning your nick, though! When we start typing, the text will be right-side-up while we type.
There is one glitch that can occur with this method: What happens when the user deletes all of the text? How do they subselect an empty or blank shape that could possibly be either very small, very invisible, or simply unselectable?
I’ve developed another technique for that. If a subshape has no text, the ShapeSheet detects this and makes the shape a minimum size, and shows a gray fill color. It also sets the subshape to non-printing, so that the ugly gray boxes don’t spoil an otherwise beautiful document when it is output to paper and delivered to customers.
The gray box gives the user a nice target to subselect, and they can happily resume editing connector text at a later time, when they’ve decided what to type.
The connectors I’ve built also have the option to selectively show or hide each text block. So if one of the stations has no text, and you turn it off, the gray box goes away until you turn it on again.
Hopefully this gives budding shape designers food for thought. Or if you’re contemplating enhancing shapes or templates that you use in your business, this might also be interesting to you. I can’t really say if one method is better than the other. I think it depends on user experience levels and workflow for the particular discipline.
From my perspective, the ultimate goal is to create an integrated solution where an add-in or VBA macro watches the user draw. When the user creates a connection, the text block at the other end of the connector gets populated with information at the point of connection. There are many technical applications where folks create diagrams that need this type of automated user assistance.
Such a solution would save a lot of users a lot of typing! And any of the three structures would be quite usable by the code that could detect and read information about glued connectors. The three-label connector is the first piece of the puzzle.