VDX documentation

This is an attempt to document the Microsoft Visio VDX XML document format. It is done purely by reverse engineering, and probably contains many errors. The Microsoft documentation is alas lacking far too much detail.

Latest version: 11 May 2006

I am working on the Dia VDX importer and will update this document once I have that working.

Key parts

A VDX document is made up of:

Definitions

These are key things used by numeric reference elsewhere: a table of colours, a table of fonts (or faces) and some document settings.

StyleSheets

Stylesheets have line, fill and text properties, and can set anything that can be set explicitly. They can inherit from a different parent for each of the three types of properties.

Masters

A master is a template for a page or object. It can contain a series of shapes, which can then be referenced from the pages.

Pages

The pages contain the actual drawings. Each Page has a list of layers, some properties and a list of Shapes.

Shapes

The Shape is the basic drawing unit. It will contain a Geom object, which will be a list of drawing primitives. If it has a Text object, these define its bounding box; otherwise they are to be drawn. It also has an XForm object that controls positioning and scaling, and may contain Line and Fill objects that control how it is drawn.

Drawing primitives

These are MoveTo, LineTo, Ellipse and EllipticalArcTo. Each one is relative to the current point, although an Ellipse is centred on the current point with radii X and Y. EllipticalArcTo isn't fully understood yet. Note that the Y axis goes up the page.

Inheritance

Most properties are inherited, yet are also stored in the file when they are referenced - this may be for backwards compatability. They have an attribute F="Inh".

Units

The following units are used: BOOL, DA, DATE, DEG, Dl, DT, IN, IN_F, MM, NUM, PT and STR. They are indicated in the F attribute in their original unit, but seem to be transformed to an absolute number for storage.

If you have any comments, contact me at vdx(at)redferni.uklinux.net.

Ian Redfern's Home