« UI Prototyping/Mockup tools you should be using | Main | A List of Tools for Automatic Graph and Diagram Layout »

Creating a Visio VDX File without using Visio

Take a look at this simple Visio diagram


What separates it from every other document I’ve shown you? it was generated on a machine that didn’t even have Visio 2007 installed.

About a year ago in the middle of my work on VisioAutomation I had written some code to generate VDX files by directly creating XML instead of automating Visio. At the time my goal was to create an ASPX page that could generate Visio charts on demand.

This mostly worked (for simple diagrams) but had one core limitation – it still required someone to have the Visio Primary Interop Assembly. With the latest code, now there is no connection at all to the PIA – I could, for example, use this code with Mono running on Ubuntu to generate the same file.

I’ll be creating a new CodePlex project with the source code shortly. Keep in mind just a few things. First, it isn’t magic – it still requires someone to have an understanding of Visio’s shapesheet concept. Second, a lot of the layout smarts have to be replicated – so for example if you want to automatically layout charts you’ll have to use something like MSAGL or GraphViz to place things. Third, to generate the output VDX it requires an input VDX (this is where it gets masters from).

As a preview, here’s a screenshot of the code from one of my unit tests. You should get a good idea of how this library works from the example below.


PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.
Author Email (optional):
Author URL (optional):
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>