Joining the Club

In an earlier post we talked about Visio being a general purpose diagramming and drawing application that enabled specialized behavior through its extensibility model.Custom shapes are combined with custom code to create an intelligent diagramming solution for a particular scenario.Sometimes users like to take this extensibility notion even further by creating their own shapes to work with the solution.We inevitably are asked how these new shapes can “join the club” or participate in the specialized behavior.

Unfortunately there is no single mechanism for registering a shape with a solution or converting a shape to work with a solution.Some Visio solutions provide this capability.Others do not, forcing the user to discover the secret handshake with the solution.We’ll look at a specific example in this post.

Legends

The Legend feature can be found in Visio’s Brainstorming template, or the Legend Shapes stencil can be opened from File > Shapes > Brainstorming.Special legend shapes are added to the diagram, and the Legend shape displays them with counts and labels.

Now imagine that you need a new shape to easily identify issues to be resolved. Here is a simple shape created with the Freeform tool.The initial alignment box for the shape is not ideal, but that can be fixed using Shape > Operations > Combine to fit the geometry into a nice upright rectangle.

It would be helpful to tally the issues in the diagram and have the total displayed in the legend as well.To do this, open the Document Stencil for the diagram by going to File > Shapes > Show Document Stencil.Then drag the issue shape over to the stencil.You should rename the shape from Master.11 (or similar) to Issue.You could also clean up the icon if desired.

Next we need to make the shape work with the legend.Drag the shape from the Document Stencil and drop it on the legend shape in the drawing.The following message will appear.

Choose Yes and then delete the shape sitting on top of the legend.Now drag out Issue shapes from the Document Stencil to annotate the drawing.The legend should reflect the total number of Issue shapes present.