Import UML Model Elements from XMI Files
To use UML class, sequence, or use case elements from other tools on UML diagrams in Visual Studio Ultimate, you can import these elements as XML Metadata Interchange (XMI) 2.1 files. After importing these elements, you can use UML Model Explorer to see them and add them to existing or new UML diagrams.
Before you import elements from .xmi files, your Visual Studio solution must contain at least one modeling project. To add a modeling project, see Create UML Modeling Projects and Diagrams.
An .xmi file might contain elements that have custom profiles. When you import an .xmi file, you will be prompted to install these profiles. If you do not install the profiles when prompted, then only the elements will be imported. You will have to import the .xmi file again to use the profiles. After you install the profiles, you will be prompted to restart Visual Studio. You must then import the .xmi file again to import the elements. If you do not restart Visual Studio, you will be prevented from importing any .xmi files, or elements, until Visual Studio is restarted.
To import model elements from an .xmi file
Open a Visual Studio solution that contains at least one modeling project.
Elements are imported into the first model in the solution. To import elements into a specific model, unload all the other modeling projects from the solution, and then reload the projects after you finish importing elements.
On the Architecture menu, click Import XMI.
In the Import an XMI File dialog box, browse to the .xmi file, and then select it.
If any custom profiles are available for you to install, a message box appears and prompts you to install those profiles:
Follow these steps
Install profiles and then import the elements.
Click Yes to install the profiles.
A message box appears and prompts you to restart Visual Studio.
Click Yes to restart Visual Studio.
If you click No, you will be prevented from importing any more .xmi files until Visual Studio is restarted.
Import the .xmi file again to import the elements.
Import elements without their profiles.
You will have to import the .xmi file again to use the profiles.
The Output window displays the status of the imported elements, indicates whether any warnings occurred, and provides the location of the XML log file to which the warnings were saved. The log file has the same name as the imported .xmi file, for example, XMIFileName.XmiImportLog.xml. If profiles were imported, a second log file is created with the following name: XMIFileName.XmiImportLog.profile.xml.
To view the imported elements, open UML Model Explorer and expand the first model node.
To open UML Model Explorer, on the Architecture menu, point to Windows, and then click UML Model Explorer.
To add imported elements to their corresponding UML diagram, drag them from UML Model Explorer to the diagram surface.
To visualize an entire sequence, drag an Interaction element from UML Model Explorer to a blank sequence diagram.