Design-Drawing Home  
Drawing Program
ISSN 1441-5585

Search...

Home
Articles
Software Catalog
Book Store
About
Advertising
Newsletter

 

 

Dynamic Connectors in Visio

David A Edson

Dave discusses Visio’s new Dynamic Connectors under Visio 5.0 and shows how to utilize them to your best advantage.

In the beginning Visio created connectors. They looked down upon them and said… "Aye, these are grand!" The 3-legged connectors served users well in Visio 1.0, 2.0 and 3.0. When these 1-D shapes were glued to connection points or vertices of 2-D shapes, they turned red and stayed glued. They also remained constantly aligned either horizontally or vertically and a control handle enabled users to relocate the center leg of the connector.

Visio users began to see countless permutations on these connectors show up in various stencils included with Visio. Connectors with YES pointing right, connectors with NO pointing down, connectors WITH arrows, connectors WITHOUT arrows and variations on a theme, which served to confuse and confound more than assist.

Under Visio 4.0, the Universal Connector was introduced. This new connector, available from the toolbar was intended to replace the forest of differing types with a singular easier-to-use connector designed for any and all applications. This connector, when used correctly, did replace many of the previous connectors, however it still lacked several features that made a connector truly powerful, like Line-Jumps and Auto-Routing.

Visio took to heart all of the user requests and under Visio 5.0 developed the new Dynamic Connector. I truly believe that once you understand how this new connector works and how to manipulate it, you will appreciate its flexibility and power and will incorporate it into all of your diagramming uses.

Connector Glue Types
Let’s start with the connector’s basic functionality. Begin a new Visio 5.0 drawing based on the Basic Flowchart. After all of the general hard-drive chatter and screen manipulations you will be looking at a new blank drawing with 2 docked stencils; Flowchart and Flowchart (additional). Go ahead and drag out two Process shapes from the Flowchart stencil. Now go up to the Visio toolbar and select the Connector Tool. That’s the one… right there between the capital letter A (the Text Tool) and the #2 pencil (the Pencil Tool). Note that your mouse cursor turns into an arrow pointer with a small connector icon attached.

If you move your mouse cursor over a connection point (a blue "X") on one of the process shapes, you will see that your cursor changes to a "plus" with attached connector icon, and that a black box appears around the connection point. This is letting you know that you are about to make what is called "point-to-point" glue. More about that in a moment. Click with your left mouse button, hold, and drag your cursor down to the other Process shape. Move over another connection point. Note the same black box appears around the connection point. Release your left mouse button. Congratulations! You have just glued the two Process shapes together. Notice how the ends of the Connector have turned red. Small red boxes appear at each end signifying that point-to-point glue has been achieved. Actually, I lied to you. Neither of the Process shapes are glued to each other. In fact, the Connector is glued to each of the Process shapes but neither of the Process shapes are glued to anything. Glue is a one-way operation. Connectors glue to connection points. 2-D shapes do not glue to Connector shapes.

Now that you have the connections made, try moving one of the Process shapes around. Note that the connections persist. This is great, however if you move what was the lower Process shape above what was the upper Process shape, you will find that the connection line seems to be taking a very long and circuitous route between them. This is because you have established "point-to-point" glue, and this may NOT be what you wanted or what you feel is the most efficient. All right, go ahead and delete the Connector shape. Make sure that the Connector shape is selected (highlighted) and hit the delete key. Let’s try this again, this time we will make a subtle change in the manner in which we make the connections.

With the Connector Tool selected, move your mouse cursor to the CENTER of one of the Process shapes. Note that the shape changes and shows a double outline around the Process shape. Click with your left mouse button, hold, and drag your cursor down to the other Process shape. Move to the center of that Process shape. Note the same double outlining occurs on that Process shape. Release your left mouse button. Do you notice a difference in the look of the Connector? Aye! That’s right! The red boxes at the endpoints of the Connector shape are larger. This signifies that you have just created Dynamic Glue.

So how is Dynamic glue different than Point-to-Point glue? Well, move the Process shapes around. Notice how the connection line always attempts to maintain the shortest path between the two Process shapes. The connection on the Process shapes will "move" from top, to side, to bottom to side as required to make the closest connection direction possible.

Line Jumps
Make sure that the two Process shapes are a respectable distance apart and that they are being glued by a Connector shape. Now drop two more Process shapes, one on either side of the Connector shape, again, at a reasonable distance apart. Using the Connector tool and the knowledge that you acquired a moment ago, go ahead and connect the two new Process shapes. Look carefully at the point where the two connection lines cross each other. You may have to zoom in a little to see this. Notice that at the point where the lines cross, a "jump", or "upside-down-u" has been placed on the new Connector shape signifying that the new Connection line is jumping over the previous connection line. These jumps are automatically placed by Visio 5.0 when you are working with Flowcharts. If you work with a new blank drawing based on no template you will not see this behavior. Yes… it is possible to obtain this behavior for ANY drawing, however this behavior has to be set explicitly in other templates and drawings.

Now as to the order for the jumps. These are established at the time the Connector shape is created and as it crosses an existing connector shape. Subsequent changes in the "Z-order" of the Connector shapes will not affect the jump nor change it from one Connector shape to another. This means that you might want to give consideration to the order that you connect shapes, if jump placement is important. Notice that if you move any of your Process shapes around, not only are the connections maintained, but additionally the jumps relocate themselves to accommodate any changes in where the Connector shapes cross over each other.

Automatic Re-Routing
Make sure that any two Process shapes are a reasonable clear distance away from each other. Now Drag out another Process shape from the Stencil and Drop it ON TOP of a Connector shape. This is an obvious "do-not-do" in laying out shapes. You do not want Connectors going through the center of newly added Process shapes. Notice that Visio takes care of this problem with Auto-routing of the new connectors. Again, this functionality is provided gratis when you work in a drawing based on the Flowcharting solution. This is not the default case in other solutions however you can explicitly set this behavior to be available.

Manipulating the Legs of Dynamic Connectors
Drag out a new Dynamic Connector by selecting the Connector tool from the tool-bar. Move the end points around. Notice that every leg of the connector has a control handle attached. As you pull on these control handles you can adjust the position of each leg segment. This is grand but… there is much more that you can now do.

Hold the control key (Ctrl) down while you move a control handle. Notice that you are able to bend a given leg at that control point. Hold a control key down while you move a vertex of the shape. Notice that you can relocate that particular vertex of that shape.

Hold the shift key (Shift) down while you move a control handle. Notice that this actually pulls out three new legs of the Connector shape. Each new leg has its own new control handle.

As you can see, the dramatically increased abilities of the new Dynamic Connector mean that the Connector shape can route exactly where and how you want and need it. Note, however, that if you move either of the endpoints of the new Dynamic Connector to a new location, the Connector shape will revert back to a three-legged connector. You will then lose the bend and flex changes that you just made.

A word about behavior
I spoke earlier about how the new Dynamic Connector shape has automatic jumps and auto-routing capabilities. I also said that you get these free with a drawing based upon a Flowchart template and that you would need to explicitly set this in other drawing types to make it available. Well, I’ll not leave you in the dark as to how this happens. There are two cells in a Visio ShapeSheet that control a shape’s routing and placement behavior. These are the ObjType and the ObjBehavior cells and are both found in the Miscellaneous Section of the ShapeSheet.

In a diagram that uses automatic layout, the object type, as found in the ObjTYpe cell, can be: placeable or routable.

By default, ObjType is set to No Formula for a shape, which evaluates to 0, meaning that Visio determines whether the shape can be placeable depending on its context. For example, if you draw a simple rectangle, the value of its ObjType cell is 0. If you then use the Connect Shapes command or the Dynamic Connector tool to connect the rectangle to another shape, Visio resets the value of the rectangle's ObjType cell to 1 (placeable).

To set the type, use the Behavior command or type one of the following numbers.

0 Visio decides based on the drawing context.

1 Shape is placeable.

2 Shape is routable.

3 Unassigned.

4 Shape is not placeable, not routable.

The behavior of a placeable or routable shape in a connected diagram is controlled by the ObjBehavior cell. To set the behavior, type one of these numbers:

0 Use behavior set for the page.

1 Create right angle connections.

2 Create straight connections.

5 Create a flowchart with north-south orientation.

6 Create a flowchart with west-east orientation.

7 Create a tree diagram with north-south orientation.

8 Create a tree diagram with west-east orientation.

In Conclusion
As you can see, a little extra knowledge of what the new Dynamic Connector is, how it behaves, and how to work with it will give you a whole lot more comfort in fully utilizing the Connector shape and make your drawings and diagrams much easier to create and maintain.

A wealth of information can be found through all of the various help resources in Visio. In particular, take a look at Visio’s on-line help and the Developing Visio Solutions text. Above all take a little time to experiment with the Connector shape and just gain a level of comfort in making it work for you in your diagrams.

I’ll close by saying "Ceuid Mile Failte" which is Scots Gaelic for "One Hundred Thousand Welcomes and Haste Ye Back. I look forward to chattin’ wi’ ye again!"

Dave "The Auld Scotsman" Edson

 

 
Rate this article...
Hmmm  OK  Good  Yes! Brilliant
Your a friend about this article.

Copyright © 1998-2007 DBM & others | Disclaimer | Privacy | Re-publication | Trademarks | Webmaster | Home