If you’ve used Visio’s 2D glue capabilities, you’ll know it’s pretty neat. Not only can you glue shapes to one-another, but you can get them to snap to a direction as well! However, if you’ve tried to heavily exploit this feature, you might have run into some problems.
It turns out that there is a limitation on the number of shapes you can chain together. On my system, in both Visio 2003, and Visio 2007, I’ve found that I can chain up to 10 shapes together. The ShapeSheet glue-formulas for the 11th shape and beyond aren’t broken, it’s just that Visio leaves them behind when you drag.
Edit: 2008.02.10: The next version of Visio has fixed this problem. Thanks Visio team!
(By the way, we’ve covered 2-dimensional glue in a previous article: Connection Point Directions and Types This post also provided tools for configuring 2D connection points. Have a look!)
Let’s Break Something!
I tested by creating shapes that were simple rectangles, with two connection points each. The left-side connection point was set to Type = 2, so that it would glue to the right-side connection point of a shape to the left. A chain 10 shapes long was the limit. An 11th shape would not follow if the first shape was dragged. The situation looked something like this:
Here we can see that 13 shapes are chained together using 2D Glue. Clicking on shape 11 reveals red handles that indicate it is glued to shape 10.
When we drag the shape 1, then next 9 follow along, but the glue limitation leaves 11, 12 and 13 behind. If we drag shape 11, then 12 and 13 will still follow along. the glue hasn’t been disrupted.
It gets even weirder: if you net-select all 13 shapes, and move the selection, the glue still breaks and 11, 12 and 13 still get left behind! Even though you selected them together! It seems the 2D-glue has some sort of priority over a Selection.
A Possible Solution?
We were recently cleaning out the old Visio Guy Inbox and came across an e-mail that discussed this problem. According to the Visio development team:
There is a threshold of 25 shapes (including sub-shapes) for showing a bitmap image of your selection while dragging. Above this threshold Visio only shows a rectangular outline. Using 2D glue is dependent on the bitmap drag image being available, so there is in effect a limit on the complexity of shapes that want to support 2D glue.
There is a registry key to remove the 25 shape threshold. Set: “HKCUSoftwareMicrosoftOffice12.0VisioApplicationDragBitmap” to “REG_SZ”. The side effect is that you will encounter degraded performance as you drag more complex shapes around.
This quote actually deals with two problems, one having to do with when a preview of a shape is generated. Normally, if a selection has more than 25 shapes (including sub-shapes), then Visio just shows a rectangle while dragging, instead of generating a representative image of the selection. This information is also covered in this post on Visio Insights. And, it seems, the chaining of 2D glue is related to the this drag-preview generation.
We tried changing the registry setting mentioned above from 3 to 2, but it had no effect on the breaking of the chain. It still broke between shapes 11 and 12. The registry setting had no effect for either Visio 2003 or Visio 2007.
Also note, you’ll want to make sure that all Visio settings are shown in the registry by going to Tools > Options > Advanced and check ing “Put all settings in registry”.
We’d like to know if any of you Visio Fans have gotten this to work, or perhaps the Micro-Visites will feed us some some more choice information via the comments-section below…