ValidationIssues
The ValidationIssues
collection stores the issues created by the Validation.Validate([RuleSet as ValidationRuleSet][, Flags as ValidationFlags])
method and by the RuleSet.AddIssue([TargetPage as Page][,TargetShape as Shape])
method. It can be reset using the Clear()
method, which will also zero the LastValidatedDate
of the parent Validation
object.
![]() |
Most issues are automatically created by the Validate()
method, but you can write code to add issues whenever the user clicks Check Diagram against a particular rule set. You would do this by listening to the RuleSetValidated(RuleSet as ValidationRuleSet)
event of the Application, Documents
, or Document
object. This technique is used by the Microsoft SharePoint Workflow template in Visio 2010.
You can enumerate the current issues in a document, and check which rule has been transgressed.
Public Sub EnumerateIssues() Dim issue As Visio.ValidationIssue Dim shpName As String Dim doc As Visio.Document Set doc = Visio.ActiveDocument...