Visio is a natural choice for creating brackets for sports tournaments.
I have seen many elimination-tournament diagrams created in Visio over the years. In fact, just a few years ago, a very nice example was done for the 2006 World Cup. You can get it at Office Online here: 2006 World Cup Bracket.
But the trouble with these diagrams is that they require *gasp* manual input of data, or user-movement of shapes. The horror!
Well this year, that is all going to change…
The Way it Should Be
It always seemed to me that the drawing and diagramming should be done by the creator, not by the user. A user should just:
- Open the drawing
- Click the Update button
- Jump for joy
Sounds like a plan, no?
Now Presenting: Automated Drawing
Well, with this wonderfully simple work-flow in mind, I’ve created a bracket diagram for the European Cup 2008 soccer/football tournament. In case you haven’t heard, Euro 2008 is going on right this minute in Austria and Switzerland, and all of Europe is glued to the television.
The diagram looks something like this. You can see the gray and green boxes where some match results are already in:
Those with sharp eyes will notice the Update button in the top-right corner:
You sharp-eyed folks might also notice that the button is ugly. Therefore it was set to Non-printing (via the Format > Behavior dialog), so it won’t besmirch your cubicle wall.
The Visio drawing contains VBA code that connects to a web service to get the latest scores and data. The diagram visually reflects the scores, the winners, the losers, and those who advance to the next round.
But to use VBA with a web service, your PC will unfortunately need additional components. Here’s the task list to get this thing to work:
- Download and install this toolkit from Microsoft:Microsoft Office XP Web Services Toolkit 2.0
If you don’t, the VBA code will not function.
- Enable the VBA macros in the diagram, when you open it. See:VBA Macro Security for more information
- Press the Update button in the top-right corner of the document
That’s all there is to it!
Your automated Visio document serves as a sort of digital dashboard, all you have to do is click Update and perhaps Print!
All that automation is nice, but if you don’t want to bother with installing extra dlls from Microsoft, or messing with VBA Macro Security, then the drawing still functions manually.
You can select each box and enter a team name or a score. Winners and losers will be shown, thanks to the underlying SmartShape technology used to create the diagram. Below, we can see that Austria turns green when they defeat Switzerland in the Quarterfinals.
As the finalists become known, country-flag icons will show up to make the diagram even more interesting! In our example, Austria, Switzerland Germany have shown their colors next to each match shape, but Germany still doesn’t have an opponent…
If the score is the same in the final rounds, then a penalty-kick boxes appear, so you can enter the results of a shoot-out. Above, Austria defeated Switzerland 5:2 on penalties.
A note about the penalty kicks: The documentation for the web service that is used to get the match information was not clear on how penalties will be reported.
It might be that the code in this document doesn’t properly handle penalty situations. If so, I will update the drawing so you can download a properly working version. Check back often!EuroCup 2008 Bracket (v1) (492 downloads)
Soccer Silliness, Fußball Spaß, Fotbol Brincadera
What technical post would be complete without comedy relief for tired eyes? Here’s a few videos from our sporting friends in Hungary and Italy to get you in the footie spirit!
Great defensive stand, lousy follow-up:
The deception that wasn’t:
Team schmeam! One man is all you need: