The AutoConnect feature in Visio has been around for a few versions now and in 2010 it included the ability to use Quick Shapes. I think it’s a great feature and really speeds building professional looking diagrams. That said it doesn’t suit every scenario and if you find yourself in this situation then this post is about a workaround to prevent the user from turning the feature on or off at document level.
AutoConnect
AutoConnect, as far as the UI is concerned, works at two levels. Firstly, you can enable or disable the feature at application level via File / Options / Advanced / Editing option:
…and then secondly, you can enable and disable the feature at Document level via View / Visual Aids:
What the View tab checkbox is doing is toggling the value a special cell in the active Document’s ShapeSheet called User.msvNoAutoConnect. When the value is set to ‘1’ the feature is disabled and when it’s ‘0’ AutoConnect becomes enabled.
Now, if you want to override this value and prevent the user from enabling it, then you might think you could add a GUARD function around the value, but Visio is ready for you and overwrites the formula. The trick, then, is to react to the change in the cell value and push the value you want back into the cell. You do this by adding a SETF function into another cell (any User cell will do but in this case I’m just using the adjacent User.msvNoAutoConnect.Prompt cell):
The result of this formula is that User.msvNoAutoConnect stays set to 1 and the checkbox in the View tab remains unchecked thereby ensuring that AutoConnect is disabled for the document.
If you add this to your template file then all subsequent documents that are generated from it will inherit the behaviour and this is the scenario in which I envisage it being used - i.e. on a solution specific basis.
If this workaround leaves you feeling a little uneasy, then I understand. I think I’d prefer to disable the View tab checkbox (as the app level option does) but, in a ShapeSheet only solution, I think this is a legitimate workaround.
Maybe a future version of Visio will include a NoAutoConnect user cell at shape level as well...