The Visio Event Monitor that's part of the SDK is a great tool for understanding how Visio works and the events that are firing away while you work. So in this post I thought I'd demonstrate a quick technique for making the output a little easier to read.
Standard output
By way of an example suppose you start Visio, open the Event Monitor tool and then create a new document based on the Basic Flowchart template and drop Start/End
and Decision
shapes onto the page.
After dropping the shapes you should see output in the monitor window that looks something like this:
Aside from the inability to change the zoom level, that's a lot of similarly formatted code.
Enter Notepad++
What you can do is copy the contents and paste into Notepad++.
One nice feature in Notepad++ is its syntax highlighting which it will either infer from the the file extension or you can set via the Language menu.
Another aspect of the syntax highlighting is that you're also able to create a User Defined Language to define your own highlighting and, even though the event output isn't a language, you can still apply some useful rules. You can create a new language by going into Language / Define your language... This allows you to define different keywords and apply different formats for each set.
I've created a language set here, that you can import:
Once that's imported and you've pasted in the monitor output you can set the language under the Language / VisioEventMonitor menu, and the results should be something like this:
I find this very helpful. The event scopes become much clearer and there's a separation between the event name, the value and formula, and the 'more info' component of the event.
I've also grouped together the Before
(and After
) events and italised the format so they become a little clearer as well:
Anyway, I hope you find this useful and that it gives you a clearer picture of what Visio is up to.