The latest version of my VisioAutomation library has been published on codeplex: http://visioautomation.codeplex.com/

Because there are so many components, I’ve drawn this conceptual map to help you see which pieces are useful for you.

image

QUICK SUMMARY

  • VisioAutomation is the name of the CodePlex project, a Visual Studio .SLN, a specific CSPROJ file, a specific DLL, and a namespace.
  • VisioAutomation.DLL contains the “core” (lowest-level) features
    • VisioAutomation.Extensions – a series of extensions methods. This is meant for the convenience of those doing low-level work with the Visio automation API
    • VisioAutomation.Util – Utility classes to simplify common scenarios such as working with Custom properties or Text formatting
    • many helper classes –
    • looks at the unit tests and the user applications and the higher-level APIs is a good way to see how these work
  • VisioAutomation.DOM
    • It’s primary purpose is really to enable one to build up a DOM or a model of a diagram and then render that all at once. One way to think about this is that it automates a lot of the techniques of drawing a diagram fast (for example the use of SetFormulas() methods and DropMany() methods )
  • VisioAutomation.Scripting
    • This is a high-level interface for people writing interactive applications. The scripting API is session-oriented– i.e. it assumes you have an instance of the Visio application you are working against and that typically operations are being performed against the currently selected set of shapes.
  • VisioAutomation.Metadata
    • This is a new DLL whose only purpose is to provide a “database” of information about visio concepts such as mapping shapesheet cell names to section indices, row indices,and cell indices. In the future I’ll use this for code generation. (Actually it was used to generated a bunch of classes in the “core” API)
  • VisioAutomation.VDX
    • This is an experimental attempt at a library that created VDX files programmatically. It enables a scenarios for you to generate Visio content without having Visio around. In practice, this is useful for relatively simple documents.
  • VisioIPy and VisioPS
    • These are command line tools for interactively playing with a Visio application via IronPython 2.6.1 and Powershell 2.0. They both completely rely on the VisioAutomation.Scripting layer
    • Here’s a screencast demonstrating VisioPS: http://www.vimeo.com/6783783
  • Visio Power Tools
    • If you aren’t interested in code or scripting – this is the tool for you. A small collection of little utilities in the form of a Visio Add-in.
    • Like VisioIPy and VisioPS it uses the VisioAutomation.scripting interface
    • It works with Visio 2007 and Visio 2010
    • Notable changes since the last version
      • The Export to XAML feature is still available, but no longer on the File Menu, instead find it under the Power Tools/ Import & Export menu
      • Added support for exporting SVG embedded in XTHML
  • VisioAutomation Samples
    • This is a demonstration app that serve several purposes: #1 it’s a showcase for some of the features, #2 it provides a way of validating that changes in the core libraries haven’t broken real-world scenarios, #3 it demonstrates how to use the core libraries and VisioIPy
  • Isotope
    • Everything that isn’t directly related to Visio gets put into this utility library. The “Isotope” name is just a placeholder and doesn’t have any special meaning.

DOCUMENTATION [updated 2010-04-15]

I have started (*started*) documenting the project here: http://cid-19ec39cb500669d8.skydrive.live.com/self.aspx/Public/Visio/VisioAutomation/VisioAutomation-Developer-Guide.docx

WHAT NEXT

  • Changes in the v 2.5 branch will be minimal, bugfix level stuff. My only planned work is to add a “Visio Power Tools 2010” project to make use of the Visio 2010 ribbon interface.
  • I’ll be creating a v 3.0 branch. This will be focused on moving to .NET 4.0. It will be experimental for quite some time.
  • Now that the core library is done, I need to update all my previous visio blog posts to use the correct APIs (http://blogs.msdn.com/saveenr/archive/tags/Visio/default.aspx) – I anticipate this will take a month or so.