Visio 2010 Validation Rules (part 2)

In my previous post, I began to explore the new Validation objects in the Visio 2010 Technical Preview, an I used some VBA code to do this.  Well, I have now uploaded the code to OneDrive ( bVisualValidationExplorer.vss ), so that you can use it too!  So, this post is about using this code …

First, download the stencil and save it to you My Shapes folder (if you trust me).  This will make it available to you to use in any Visio 2010 document.

Then, whenever you want to use the code, simply open the stencil from the More Shapes / My Shapes category….

imageThe stencil will be docked with the other shape stencils, but, of course, this stencil does not have any shapes … only VBA code.


To keep it simple, I have exposed just one public macro, ThisDocument.Show Validation, which you can run by selecting the bVisualValidationExplorer.vss in the list of Macros dialogue.


Note, for those of you ( like me ) who had trouble finding out where to switch on the Developer ribbon, look under the Options / Advanced settings.  There you will find the Run in Developer Mode check box.:


So, if you have a BPMN diagram, for example, then you are able to validate it against a selected rule set:

image The bVisual Validation Explorer lists the Issues too, but it additionally displays the Name of the transgressed Rule, along with the Page and , if relevant, the Shape Name.


In addition, it focuses the rule that has been transgressed on the Rules tab :


The Test and Filter Expressions of some rules are longer that the singe line that I have allowed for in the main dialogue, so I have provided a builder button to the right of each one enables you to open the expression in a large multi-line box:


All of the editable properties are editable, and I have included buttons to :

  • Validate or Clear Issues in a document
  • Delete an Issue
  • Add, Delete, or Copy Rulesets, , and to Paste a copied Ruleset
  • Add and Delete Rules, or even to Add Issue of the selected rule to a nominated Shape:


This is based on the Microsoft Visio 2010 Technical Preview so it may not work with the full release … but I will update it if that is the case.  All the rules developer needs to know now is how to construct the Test and Filter Expressions! Hmmmm ……


One Response to “Visio 2010 Validation Rules (part 2)”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.


O365 and SharePoint

Simplify Tasks

Want to learn the simple way?

Paul Turley's SQL Server BI Blog

sharing my experiences with the Microsoft data platform, SQL Server BI, Data Modeling, SSAS Design, Power Pivot, Power BI, SSRS Advanced Design, Power BI, Dashboards & Visualization since 2009

John Goldsmith's visLog

be smart, be clear, be visual ...

Mo's blog

Personal views on Dynamics 365 for Operations and Technical Architecture.

Chris Webb's BI Blog

Microsoft Power BI, Analysis Services, MDX, DAX, M, Power Pivot and Power Query

Azure Solutions for Office 365, and more...

Rob Fahrni



Life with Visio and other Microsoft Toys!

Nilsandrey's Weblog

Just another weblog

Things that Should be Easy

Every so often (too often in the IT industry) I encounter things that should have been very easy to do but turned out to be far too complicated. My favorite topics include SharePoint, .Net development, and software architecture, especially distributed systems.

Visio Guy

Smart graphics for visual people

%d bloggers like this: