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….
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:
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 ……