Microsoft Visio UML to XMI export

Tweet about this on TwitterShare on FacebookBuffer this pageShare on RedditShare on LinkedInShare on Google+Email this to someone

UPDATE: If you are interested in importing Visio UML class diagrams in other tools as ArgoUML, Poseidon or Eclipse UML2 or in visualizing them online check out my XMI transformation service

Microsoft Visio 2003 included a XMI Export component to export UML models to XMI-compliant files.

However this was not possible in Microsoft Visio 2007 until now with the recent release of the Microsoft Visio Service Pack 2 that contains a new version of the XMI Export component (instructions below)

Although I think it is very positive that Visio offers some kind of XMI export support, my first impression is not very optimistic: the generated XMI is too verbose, it seems that only class diagram elements are exported (as happened with Visio 2003) and more surprisingly, the XMI export is language-dependent!! (that is, the XMI file presents small differences depending on the user predefined language).

For instance, to indicate that an association end it is not an aggregation, Visio would generate the following XML Element for Spanish Visio users:

  • Foundation.Core.AssociationEnd.aggregation xmi.value=”ninguno”

but this would be the XML element generated for English users:

  • Foundation.Core.AssociationEnd.aggregation xmi.value=”none”

where “ninguno” is the Spanish word for “none”. This implies that to import the generated XMI in another CASE tool we must deal with these language variations. Incredible. Let’s hope this will be fixed IN future releases.

AS an example, this IS the Visio XMI file (MORE than 500k!) CORRESPONDING TO this simple UML model:
Visio UML model

Activating the XMI export component IS NOT an easy task either. Thanks TO the help I’ve found in the Visio Insights msdn blog
, I’ve managed TO find out that the process IS the following. After installing the SP2, go TO “Tools->Macros->Open the Visual Basic Editor” AND WRITE AND EXECUTE the following code:

Sub ExportXMI()

Application.Addons(“UML Background Add-on”).Run (“/CMD=400 /XMIFILE=””C:\file.xmi”””)

END Sub

If you enjoyed the post you can subscribe TO this Modeling blog AND/OR follow me ON twitter

AND if you really liked it help me pass it ON TO others by bookmarking AND sharing the post USING the links below:

Tweet about this on TwitterShare on FacebookBuffer this pageShare on RedditShare on LinkedInShare on Google+Email this to someone
Tags:
Comments
  1. Anonymous
  2. Anonymous
  3. jordi
  4. Anonymous
  5. jordi

Reply

Your email address will not be published. Required fields are marked *