Overview of the Validation objects
The Validation
object model is accessed from the Visio Document
object. The Validation
object is only available if the code is running in Visio Premium edition, so you should check the edition, as described previously in Chapter 2.
The Validation
object contains two collections, Issues
and RuleSets
, which leads you to the main areas of the API.
The ShowIgnoredIssues
property merely dictates whether or not the Issues window displays ignored issues. If the user selects to show ignored issues, then they are shown as grayed out.
The following DebugPrintValidation
macro will display the detail of the validation object, but notice that you have to delve into the Issues, Issue
, and Rule
objects to retrieve the count of ignored issues, as displayed in the UI. In fact, an issue can be ignored individually, or by virtue of its rule being marked as ignored.
Public Sub DebugPrintValidation() Debug.Print "DebugPrintValidation" Dim ignoredIssues As Integer With Visio...