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

 

Want to build better software faster?

Want to build better software faster?

Read about the latest trends on software modeling and low-code development

You have Successfully Subscribed!

Pin It on Pinterest

Share This