Friday, October 31, 2008

Export UML to XMI from Visio 2003

A friend wanted to export his UML diagrams created with Visio to XMI files so then we could run some kind of ColdFusion tool to generate code based on the created diagrams. It appeared however that Visio did not come out of the box a way to do that. Some googling reveled that there is a add-on Microsoft offers but you have to get it, compile it (in Visual C++ non the less) and install it. What a major hassle. So being the problem solver I tend to be, I installed Visual C++ and went at it. About almost an hour later, the procedure below did the trick.

Something to Note: The supported UML diagrams are: Static Structure, Component and Deployment diagrams, and State chart (directly from Microsoft’s documentation about the add-on).

  1. Get the zip file below
  2. Copy “XMIEXPRT.DLL” to “C:\Program Files\Microsoft Office\Visio11\DLL\”
  3. Copy “VisioUmlAddon.vsl” to “C:\Program Files\Microsoft Office\Visio11\1033\”
  4. Open Visio 2003 and:
    1. Go to Tools/Options/Security/Macro Security
    2. Set the Macro Security to “Medium” or “Low”
    3. Go back to Options and go to Advanced
    4. Click on “File Paths” and set the “Add-ons” path to
      “C:\Program Files\Microsoft Office\Visio11\1033”
    5. Restart Visio 2003
  5. Now you should be able to create a UML diagram and go to Tools/Add-Ons and see “XMI Export” all the way on the bottom.


// //]]>