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 SkyDrive ( http://cid-3350d61bc93733a9.skydrive.live.com/self.aspx/Blogs/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.

image

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

image

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.

image

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

image

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:

image

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:

image

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

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 185 other followers

%d bloggers like this: