Too many connectors? Toggle them on and off presentation style

I got this question again today and decided to throw together a quick sample demonstrating how you can toggle the visibility of connectors using a little bit of code and the Visio Object Model.

This is no where near a perfect, hardened solution as I literally put this together in about 5 minutes ( it too me longer to write this blog article )…and it uses VBA so it is definitely not optimized for performance Winking smile

If you open the attached Visio diagram you will first need to enable macros by clicking on the friendly little “Enable Content” button at the top of the drawing window.

image

The VBA code in the diagram will automatically initialize and after this if you click on one of the server shapes in the diagram you will see that the connectors coming in and out of the selected shape turn off or on ( actually just toggling the visibility of the connector’s geometry ).

imageimage

Toggling Connections.vsd