Reader small image

You're reading from  Microsoft Visio 2010 Business Process Diagramming and Validation

Product typeBook
Published inJul 2010
Reading LevelIntermediate
PublisherPackt
ISBN-139781849680141
Edition1st Edition
Languages
Right arrow
Author (1)
David Parker
David Parker
author image
David Parker

David J Parker's background has been in data visualization ever since he struggled to produce lists of hospital equipment from Computer Aided Design models of buildings as a budding architect in the '80s. He moved into building and infrastructure asset management in the late '80s using a Unix system and gradually migrated to Windows-based systems throughout the '90s. He became a European Business partner of Visio Corporation in 1996 and presented the database-linked Visio solutions that he was providing merchant banks in London and New York with at several international conferences. David started bVisual Ltd. in 1998, which provides Visio-based solutions to various industries, and became a Silver-level Microsoft partner. He has been a Microsoft MVP (Visio) for the last 12 years and has helped Microsoft Corp, UK and Western Europe, by providing Visio solutions, training, website content, and presentations. David has had several books on Visio published and has been presenting Visio/SharePoint integration courses for many years for Microsoft Western Europe, from Oslo in the North down to Lisbon in the South. He has presented at SQL and SharePoint Saturday conferences and writes a regular blog for people interested in Microsoft Visio.
Read more about David Parker

Right arrow

The ValidationRules collection


Once you have a rule set you can review, amend, or add to the rules within it. You can add a rule using the ValidationRules.AddRule(NameU as string) method. Note that the NameU is really for use in code, since it is the Description property that is displayed in UI. The NameU must be unique within the Rules collection of the parent ValidationRuleSet.

You can retrieve a rule by its index position in the collection, using ValidationRules.Item(index), or by its ID using ValidationRules.ItemFromID(ID). Once you have retrieved a ValidationRule you can read its NameU and Description, or check if the rule set is ignored for validation.

Public Sub EnumerateRules()
Dim doc As Visio.Document
Dim ruleSet As Visio.ValidationRuleSet
Dim rule As Visio.ValidationRule
Set doc = Visio.ActiveDocument
For Each ruleSet In doc.Validation.RuleSets
If ruleSet.Enabled Then
Debug.Print "EnumerateRules for RuleSet : " & _
ruleSet.nameU & " : Count = " & _
ruleSet.Rules.Count...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Microsoft Visio 2010 Business Process Diagramming and Validation
Published in: Jul 2010Publisher: PacktISBN-13: 9781849680141

Author (1)

author image
David Parker

David J Parker's background has been in data visualization ever since he struggled to produce lists of hospital equipment from Computer Aided Design models of buildings as a budding architect in the '80s. He moved into building and infrastructure asset management in the late '80s using a Unix system and gradually migrated to Windows-based systems throughout the '90s. He became a European Business partner of Visio Corporation in 1996 and presented the database-linked Visio solutions that he was providing merchant banks in London and New York with at several international conferences. David started bVisual Ltd. in 1998, which provides Visio-based solutions to various industries, and became a Silver-level Microsoft partner. He has been a Microsoft MVP (Visio) for the last 12 years and has helped Microsoft Corp, UK and Western Europe, by providing Visio solutions, training, website content, and presentations. David has had several books on Visio published and has been presenting Visio/SharePoint integration courses for many years for Microsoft Western Europe, from Oslo in the North down to Lisbon in the South. He has presented at SQL and SharePoint Saturday conferences and writes a regular blog for people interested in Microsoft Visio.
Read more about David Parker