The concept of Structured Diagrams was introduced in Visio 2010 and is featured in many of the templates supplied with Microsoft Visio, and in some third-party solutions, like mine. Connectors, callouts, containers and lists are the key parts of a structured diagrams, and there are times when preventing the deletion of members of a container or list is desirable.
Visio does have the ability to lock a layer, and therefore preventing deletions of shapes assigned to that layer, but that also prevents the shapes being selected, and thus any movement, shape data or hyperlinks become inaccessible. Visio also the ability to protect any shapes from deletion with an option in the Developer / Shape Design / Protection dialog, but this has to be applied to selected shapes.
Another option is to use the container Format ribbon, however this is not visible by default for any cross-functional flowchart diagrams because Microsoft supplied a custom CROSS-FUNCTIONAL FLOWCHART ribbon tab. This is invisible because the User.msvSDContainerNoRibbon cell has a a TRUE value. Simply changing this to FALSE will enable the Format ribbon tab to be seen. There are some dangerous buttons, such as Disband Container, and some superfluous buttons, but there are also a couple of useful ones.
The container Format / Membership ribbon group has a Lock Container button. This will prevent the accidental deletion of any of the existing members of the parent container or list of the selected shape.
Note that it does not prevent the deletion of the connectors, as they are not considered to be members of the container or list.
Behind the scenes, the value of the User.msvSDContainerLocked cell of the container or list is being toggled between FALSE and TRUE. Be aware that a container or list does not accept any new members if the value is TRUE.
Notice that there is also a Select Contents button which allows you to select all of the container or list members in one click.
Note that there are more hidden selection capabilities in MultiSelect for Visio add-in.
See Custom containers, lists and callouts in Visio 2010 and Microsoft Visio Developer 2010 Training for more information.
Back in 2012, my fellow Visio MVPs, Scott Helmers and Chris Roth, and I recorded a series of 24 videos about Visio 2010. They were first hosted on Microsoft’s web site, then they put them up on YouTube, they they got deleted :-(. Well, we have managed to retrieve them, and put them back up…
Learn how to enhance the built-in containers in Visio
Most of my Visio diagrams have simple connections between shapes, and my previous post about connections used a flowchart as an example (see https://blog.bvisual.net/2016/08/09/understanding-visio-connections/ ). However, it has come to my attention that some Visio developers add connection points to sub-shapes of Visio group shapes, and then connect between the sub-shapes. This means that the…
Adding more selection capabilities to Visio increases productivity.
Update : I have received a corrected response from my friends at Microsoft regarding the use of Spatial Neighbors and Containers, so I have to revise this post from its original. The changes are marked in Red. The Structured Diagramming API in Visio 2010 is really neat, but there are a couple of problems that…
Microsoft Visio 2010 Premium Edition introduced an extension to the Visio Type Library called the Validation API. This provides the capability to validate a Visio diagram to ensure that its construction complies with industry-standard or company –wide rules. Organizations are able to use this new feature to encapsulate business logic as validation rules, grouped within…