+ All Categories
Home > Documents > User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38...

User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38...

Date post: 30-Apr-2020
Category:
Upload: others
View: 19 times
Download: 0 times
Share this document with a friend
97
Model Exchange Enterprise Architect User Guide Series Author: Sparx Systems Date: 26/07/2018 Version: 1.0 CREATED WITH
Transcript
Page 1: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

Model Exchange

Enterprise Architect

User Guide Series

Author: Sparx SystemsDate: 26/07/2018

Version: 1.0CREATED

WITH

Page 2: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49
Page 3: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

Table of Contents

Model Exchange 5Copy Packages Between Projects 6XMI Import and Export 9Export to XMI 12Import from XMI 16Merge Package with XMI Using Merge File 21Merge Package Directly with XMI 25Import EMX/UML2 Files 28Import a Rhapsody Model 32Import a MagicDraw MDZIP File 35Limitations of XMI 38The UML DTD 40

CSV Import and Export 41CSV Specifications 43Using Preserve Hierarchy 49

CSV Export 51CSV Import 55

Controlled Packages 59Controlled Package Menu 61Configure Packages 69Remove Package from Control 74Save a Package 76Load a Package 78

Page 4: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

Batch XMI Export 80Batch XMI Import 83Manual Version Control with XMI 86Report Deletion of Cross Package References 89

Project Data Transfer 94

Page 5: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Model Exchange

Using Enterprise Architect, you can transfer data betweenprojects using one of three different mechanisms:

XMI Import and Export - Packages can be exported from·and imported into your models; this greatly improves theflexibility and robustness of the models because Analystsand Modelers can externalize model elements in XMI forversion control, distributed development, post processingand transferring Packages between models

CSV Import and Export - You can import and export·information on Enterprise Architect elements in CSVformat, and then store and retrieve the information fromspreadsheet tools such as Microsoft Excel

Data Transfer - You can move complete models between·files, and between files and repositories, row by row, tableby table

(c) Sparx Systems 2018 Page 5 of 97

Page 6: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Copy Packages Between Projects

It is possible to copy and move individual Packages betweenprojects, exporting and importing the Packages as XMI files.You can also duplicate larger structures, such as completemodels or projects. This gives you a high level of flexibilityin building a project from re-usable parts and from elementsproduced in widely-dispersed geographic regions.

Access

Ribbon Publish > Model Exchange > Export XMI> Export XMI for Current PackagePublish > Model Exchange > Import XMI> Import Model XMI

KeyboardShortcuts

Ctrl+Alt+E (export to XMI)Ctrl+Alt+I (import from XMI)

Copy a Package from one EnterpriseArchitect project to another

Ste Action

(c) Sparx Systems 2018 Page 6 of 97

Page 7: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

p

1 Open the project to copy from.

2 In the Project Browser, click on the Package to copyand select the 'Publish > Model Exchange > ExportXMI > Export XMI for Current Package' ribbonoption.The 'Export Package to XMI' dialog displays.

3 Select the appropriate options and filename.

4 Click on the Export button to begin the exportprocess.

5 When the export is complete, open the project tocopy into.

6 In the Project Browser, navigate to the location toimport the Package into.

7 Click on the target Package and select the 'Publish >Model Exchange > Import XMI > Import ModelXMI' ribbon option.The 'Import Package from XMI' dialog displays.

8 Select the appropriate options and filename.

(c) Sparx Systems 2018 Page 7 of 97

Page 8: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

9 Click on the Import button.The Package is copied from the source project to thedestination project.

Notes

If the Package you are importing already exists in the·

target project (that is, it has been imported previously),you must either import over the existing Package or selectthe 'Strip GUIDs' option

In the latter case, the system creates a copy of the originalPackage

(c) Sparx Systems 2018 Page 8 of 97

Page 9: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

XMI Import and Export

XML Metadata Interchange (XMI), defined by the OMGand based on XML, is an open standard file format thatenables the interchange of model information betweenmodels and tools.

XMI and Enterprise Architect

Enterprise Architect uses XMI as a method of importing andexporting model specifications between different UMLPackages, Enterprise Architect projects and other tools thatsupport XMI. The system supports the XMI 1.1, 1.2, 2.1,2.4, 2.4.2 and 2.5.1 specifications. XMI 1.1 provides supportfor UML 1.3, whereas XMI 2.x is used for UML 2.0 - 2.5.

Enterprise Architect does not fully support the older 1.0specification. When importing or exporting to XMI 1.0,some loss of data occurs due to the limitations of XMI 1.0.

With XMI, model details can be exchanged betweendifferent UML tools and other tools that are capable of usingXMI. Limited support for export to Rational Rose isprovided using the Rose version of the XMI 1.1specification, as implemented by Unisys for Rationalproducts.

Packages can be exported from and imported into EnterpriseArchitect models, which greatly improves the flexibility androbustness of the models, helping Analysts and Modelers to

(c) Sparx Systems 2018 Page 9 of 97

Page 10: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

externalize model elements in XMI for:

Version control·Distributed development·Post processing and·Transferring Packages between models·

When importing an XML file over an existing Package, bydefault all information in the current Package is deletedbefore the data is imported from the XML file. Please makesure you do not have important changes that you do notwant to lose before importing from XML. Alternatively, usea merge file to merge the information in the XMI file withthe contents of the Package.

XMI Tasks

Tasks you might perform in importing and exporting XMIinclude:

Setting XML Options - XMI import, export and Package·

control all rely on saving and loading XML files; you canset a number of options to streamline this process

Exporting a Package to XMI in XMI 2.1 (and earlier)·

Importing from XMI with support for XMI 2.1 (and·

earlier)

Setting up controlled Packages·

Manually controlling a Package by linking it to an XMI·

(c) Sparx Systems 2018 Page 10 of 97

Page 11: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

file

Batch exporting controlled Packages·

Batch importing controlled Packages·

Factoring in the limitations of XMI·

Applying a UML Data Type Definition (DTD)·

Importing a model from IBM Rational Rhapsody·

Importing a model from a MagicDraw MDZIP file·

Notes

XMI 2.1 exported by Enterprise Architect 7.0 (or later)·

might not be correctly imported into earlier versions ofEnterprise Architect

When performing Enterprise Architect-to-Enterprise·

Architect transfers, ensure that either XMI version 1.1 orXMI version 2.1 is selected

(c) Sparx Systems 2018 Page 11 of 97

Page 12: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Export to XMI

You use the 'Export Package to XMI' dialog to export aPackage from your model to a file in one of several XMI(XML-based) formats. The dialog, by default, allowsexporting to either XMI 1.1 or XMI 2.1. The exported XMIfile contains all the information required for completelyround-tripping the Package within Enterprise Architect; thatis, performing Enterprise Architect-to-Enterprise Architecttransfers.

Access

Select a Package in the Project Browser, then:

Ribbon Publish > Model Exchange > Export XMI> Export XMI for Current Package

ContextMenu

Right-click on Package > Import/Export> Export Package to XMI file

KeyboardShortcuts

Ctrl+Alt+E

Export a Package to an XMI file

(c) Sparx Systems 2018 Page 12 of 97

Page 13: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Option Action

Package Displays the name of thecurrently-selected Package.If this is not the required Package, clickon the button and select the correctPackage.

Filename Type in the file path of the XMI file to begenerated, or click on the button andbrowse for the location.

Export Type 'XMI 1.1' - Select this option to export·

the selected Package to XMI 1.1'XMI 2.1' - Select this option to export·

the selected Package to XMI 2.1'Publish' - Click on this button to open·

the 'Publish Model Package' dialog forexporting to other versions of XML

GenerateMerge fileusingBaselineVersion

This option is enabled when:'Export Type' is set to 'XMI 1.1' and·

The selected Package has a baseline·

Click on the button to open the'Baselines' dialog and select the baseline.Once the export is complete, the mergefile will be generated by comparing the

(c) Sparx Systems 2018 Page 13 of 97

Page 14: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

selected Package with the selectedbaseline. The merge file will be generatedin the same location as the XMI file, withthe same name as the XMI file but withthe suffix _Merge.xml.This file is used to merge the contents ofa Package with that of the XMI file, usingthe 'Merge Package with XMI' dialog.

View XMI Click on this button to view the exportedXMI file.

Export Click on this button to initiate the XMIexport.

Close Click on this button to close this dialog.

Help Click on this button to display this Helptopic.

Progress Monitor the progress of the XMI Export.

Notes

In the Corporate, Unified and Ultimate editions of·

Enterprise Architect, if security is enabled you must have

(c) Sparx Systems 2018 Page 14 of 97

Page 15: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

'Export XMI' permission to export to XMI

Alternative Images used in the Package being exported·

are not included in the exported XMI file, unless the'Export Alternate Images' option is selected in the 'XMLSpecifications' section of the 'Preferences' dialog

The Log file for the Package being exported is not·

generated unless the 'Write Log' option is selected in the'XML Specifications' section of the 'Preferences' dialog

XMI 2.1 exported by Enterprise Architect 7.0 (or later)·

might not be correctly imported into earlier versions ofEnterprise Architect

(c) Sparx Systems 2018 Page 15 of 97

Page 16: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Import from XMI

You can copy Enterprise Architect model elements betweenmodels, for distributed development, manual version controland other benefits. You do so by importing the parentPackage from an XMI (XML-based) file in any of theseformats:

UML 1.3 (XMI 1.0)·

UML 1.3 (XMI 1.1)·

UML 1.4 (XMI 1.2)·

UML 2.x (XMI 2.1)·

MOF 1.3 (XMI 1.1)·

MOF 1.4 (XMI 1.2)·

You can also import the *.emx and *.uml2 files generatedby tools such as Rational Software Architect (RSA) andRational Software Modeler (RSM), as well as CanonicalXMI 2.1 files, BPMN 2.0 XML files, Rhapsody andMagicDraw models, and XML files exported by ArcGIS.

Access

Select your target Package in the Project Browser, then:

Ribbon Publish > Model Exchange > Import XMI> Import Model XMI

(c) Sparx Systems 2018 Page 16 of 97

Page 17: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

ContextMenu

Right-click on Package > Import/Export> Import Package From XMI

KeyboardShortcuts

Ctrl+Alt+I

Import a Package from an XMI file

Option Action

Filename Type the directory path and filenamefrom which to import the XMI file.

Importdiagrams

Select the checkbox to import diagrams.

Strip GUIDs Select the checkbox to remove UniversalIdentifier information from the file onimport.By removing the GUID, you can import aPackage twice into the same model; thesecond import requires the checkbox tobe selected, to apply new GUIDs to avoidelement collisions.

Write log file Select the checkbox to write a log of

(c) Sparx Systems 2018 Page 17 of 97

Page 18: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

import activity (recommended).The log file is saved in the directory fromwhich the file is being imported, with thesame name as that of the imported fileplus the suffix _ import.log.

Import usingsingletransaction

This option defaults to the setting of the'Import using single transaction'checkbox in the 'XML Specifications'page of the 'Preferences' dialog. If youprefer, you can change the option fromthe default setting.If the checkbox is selected, the XMI fileis imported in one transaction. This is notrecommended for large imports.If the checkbox is not selected the dataitems are imported separately; you canidentify problem items without the wholeimport being blocked. If the import islikely to encounter locking issues, or ifyou are importing a large XMI file,deselect the checkbox.

Merge XMI Click on this button to display twooptions for merging the content of theXMI file with the content of the selectedPackage.

'Use Merge File' - Merge the contents·

of the XMI file with the contents of the

(c) Sparx Systems 2018 Page 18 of 97

Page 19: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Package using a Merge File'Direct Merge' - Merge the contents of·

the XMI file directly with the contentsof the Package, without a Merge File

TreatImportedDatatypes

If you are importing from Rose XMI 1.1,click on the drop-down arrow and selectthe datatypes to add to the model.

BaselinePackage afterImport

Select this checkbox to open the 'CreateBaseline' dialog, through which tobaseline the imported Package once theimport is complete.Selecting this option also generates amerge file when exporting a Package toXMI 1.1 using  the 'Export Package toXMI' dialog.

Import Click on this button to start the import.

Close Click on this button to close the dialog.

Help Click on this button to display this Helppage.

ImportProgress

Indicates the progress of the import.

(c) Sparx Systems 2018 Page 19 of 97

Page 20: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Notes

In the Corporate, Unified and Ultimate editions of·

Enterprise Architect, if security is enabled you must have'Import XMI' permission to import Packages from XMI

If you are connected to a SQL Server repository, you·

require ALTER permission on the t_image table inEnterprise Architect, to be able to import model images

When you import an XML file over an existing Package,·

ALL information in the current Package is deleted first,unless you use the Use Merge File button; before youimport the XML file, please make sure you do not haveimportant changes that you do not want to lose

If you are importing an XMI 1.1 file that was previously·

exported with a UML_EA.DTD file, the UML_EA.DTDfile must be present in the directory into which the XMIfile is being written; an error occurs if the UML_EA.DTDfile is absent

(c) Sparx Systems 2018 Page 20 of 97

Page 21: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Merge Package with XMI Using MergeFile

If you are working in a distributed environment, eachmodeler could be working on a separate file copied (as anXMI export/import) from the master model. At intervals youwould want to bring each person's work back into the mastermodel. One way of doing this is to also export eachmodeler's copy as an XMI file, and import and merge eachfile in turn with the corresponding Package in the mastermodel.

The logical next step would be to again export the mastermodel as an XMI file so that each modeler could thenimport that into their copy to synchronize their model withthe latest version of the whole team's work. However, if anyof the team have continued to work on their copy, they canalso merge the 'master' XMI file with their copy so that theydo not overwrite their latest work.

Access

Select your target Package in the Project Browser, then useone of the methods outlined here to open the 'MergePackage with XMI' dialog.

Ribbon Publish > Model Exchange > Import XMI> Merge Model XMI into Current

(c) Sparx Systems 2018 Page 21 of 97

Page 22: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Package

ContextMenu

Right-click on Package > Import/Export> Import Package From XMI : MergeXMI > Use Merge File

KeyboardShortcuts

Ctrl+Alt+I : Merge XMI > Use MergeFile

Merge Package options

Option Action

Package Displays the name of thecurrently-selected Package, the contentsof which will be merged with theimported XMI file.If this is not the required Package, clickon the button and select the correctPackage.

XMI File Type in the directory path and filenameof the XMI file, or click on the Browsebutton and locate the file.

Merge File Type in or browse to the directory path

(c) Sparx Systems 2018 Page 22 of 97

Page 23: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

and filename of the merge file, generatedusing the 'Export Package to XMI' dialog.The field defaults to show the merge filein the same location as the XMI file.

BaselinePackagebefore Merge

Select the checkbox to show the 'CreateBaseline' dialog, to baseline the selectedPackage before merging the XMI file.You can use this baseline to roll back tothe content of the pre-merged Package, ifrequired.

ComparePackage withBaseline afterMerge

Select the checkbox to automaticallycompare the Package with the Baselineonce the merge is complete.This checkbox is enabled when the'Baseline Package before Merge' optionhas been selected.

Merge Click on this button to merge the Packageand its contents with the contents of theXMI file.

Close Click on this button to close the 'MergePackage with XMI' dialog.

Help Click on this button to display this Helppage.

(c) Sparx Systems 2018 Page 23 of 97

Page 24: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

(c) Sparx Systems 2018 Page 24 of 97

Page 25: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Merge Package Directly with XMI

You have two options for importing a Package into a modelfrom XMI, where that Package already exists in the model:

Merging the Package directly, as documented here, where·

Enterprise Architect simply merges the differencesbetween the XMI file and the existing Package in themodel

Using a merge file, as documented in the Merge Package·

with XMI Using Merge File topic, where EnterpriseArchitect deletes the existing Package from the model andimports the new Package information from XMI

Access

Select your target Package in the Project Browser, then useone of the methods outlined here to open the 'Import Modelfrom XMI' dialog.

On the 'Import Model from XMI' dialog, click on the MergeXMI button, then choose the option 'Direct Merge'.

Ribbon Publish > Model Exchange > Import XMI> Import Model XMI : Merge XMI >Direct Merge

ContextMenu

Right-click on Package > Import/Export> Import Package From XMI : Merge

(c) Sparx Systems 2018 Page 25 of 97

Page 26: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

XMI > Direct Merge

KeyboardShortcuts

Ctrl+Alt+I : Merge XMI > Direct Merge

Merge Package Options

Option Action

Package Displays the name of thecurrently-selected Package, the contentsof which will be merged with theimported XMI file.If this is not the required Package, clickon the button and select the correctPackage.

XMI File Type in the directory path and filenameof the XMI file, or click on the buttonand locate the file.

BaselinePackagebefore Merge

Select this checkbox to open the 'CreateBaseline' dialog, to create a baseline ofthe selected Package before merging theXMI file.You can use this baseline to roll back to

(c) Sparx Systems 2018 Page 26 of 97

Page 27: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

the content of the pre-merged Package, ifnecessary.

CompareBaseline withPackage afterMerge

Select this checkbox to automaticallycompare the Package with the Baselineonce the merge is complete.The checkbox is enabled when the'Baseline Package before Merge'checkbox is selected.

Merge Click on this button to begin the merge ofthe Package content with the XMI filecontent.

Close Click on this button to close the 'MergePackage with XMI' dialog.

Help Click on this button to display this Helppage.

(c) Sparx Systems 2018 Page 27 of 97

Page 28: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Import EMX/UML2 Files

In Rational Software Architect (RSA) you can add manyUML models under a single root. These models can havecross references between them. However, RSA cannot savethe entire root as one file - it saves each UML model as aseparate EMX file. This means that an EMX file withcross-references is not self-contained as it referenceselements in another EMX file.

In releases earlier than release 7.0, Enterprise Architecttreats each EMX file as a separate model and hence does notallow for cross-references between them. From release 7.0,Enterprise Architect enables these cross-references.

You therefore have the options of:

Importing a single EMX/UML2 file or·

Importing a group of related EMX/UML2 files together,·

thereby retaining the cross-references between thedifferent files

Access

Select your target Package in the Project Browser, then useone of the methods outlined here to open the 'Import Modelfrom XMI' dialog.

On the 'Import Model from XMI' dialog, click on the OtherXML File Formats button, then choose the option'EMX/UML2'.

(c) Sparx Systems 2018 Page 28 of 97

Page 29: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Ribbon Publish > Model Exchange > Import XMI> Import Model XMI : Other XML FileFormats > EMX/UML2

ContextMenu

Right-click on Package > Import/Export> Import Package From XMI : OtherXML File Formats > EMX/UML2

KeyboardShortcuts

Ctrl+Alt+I : Other XML File Formats >EMX/UML2

Import Files

Option Action

Package Displays the name of thecurrently-selected Package.If this is not the required Package, clickon the button and select the correctPackage.

Directory Click on the button.The 'Select Import EMX/UML2 File(s)'dialog displays, from which you canselect multiple files.

(c) Sparx Systems 2018 Page 29 of 97

Page 30: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Select the file or files (use Ctrl+click orShift+click to select several files) andclick on the Open button to return to the'Import Package from EMX/UML2'dialog.

SelectedFiles

Lists the selected *.emx/*uml2 files.

Write LogFile

Select this checkbox to write a log of theimport activity (recommended).The log file is saved in the directory fromwhich the files are being imported, withthe name import.log.

Import Click on this button to import the*.emx/*uml2 files.

Close Click on this button to abort the importand close the dialog.

Help Click on this button to display this Helptopic.

ImportProgress

Monitor the progress of the import.

(c) Sparx Systems 2018 Page 30 of 97

Page 31: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

(c) Sparx Systems 2018 Page 31 of 97

Page 32: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Import a Rhapsody Model

If you have developed a UML model in IBM RationalRhapsody, you can import it into an Enterprise Architectproject.

Each Rhapsody project contains one Project file (with thefile extension .rpy), which is associated with a folder withthe same name, ending in _rpy. For example, if theRhapsody project file is called CDPlayer.rpy, it is associatedwith a folder called CDPlayer_rpy.

The associated folder contains all the project-related files. Itcould also contain a file named filesTable.dat, which lists allthe files related to the Rhapsody project.

Access

Select your target Package in the Project Browser, then useone of the methods outlined here to open the 'Import Modelfrom XMI' dialog.

On the 'Import Model from XMI' dialog, click on the OtherXML Formats button, then choose the option 'Rhapsody'.

Ribbon Publish > Model Exchange > Import XMI> Import Model XMI : Other XML FileFormats > Rhapsody

Context Right-click on Package > Import/Export

(c) Sparx Systems 2018 Page 32 of 97

Page 33: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Menu > Import Package From XMI : OtherXML File Formats > Rhapsody

KeyboardShortcuts

Ctrl+Alt+I : Other XML File Formats >Rhapsody

Import UML Model from Rhapsody ProjectFiles

Option Action

Package Displays the name of thecurrently-selected Package.If this is not the required Package, clickon the button and select the correctPackage.

RhapsodyProject

Click on the button.The 'Select Import Rhapsody Project'dialog displays.Select a Rhapsody Project file, then clickon the Open button to return to the'Import Model From Rhapsody' dialog.

Rhapsody Shows the name of the file located in the

(c) Sparx Systems 2018 Page 33 of 97

Page 34: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Files associated project folder.

Import Click on this button to import theRhapsody model into EnterpriseArchitect.

Close Click on this button to abort the importand close the dialog.

Help Click on this button to display this Helptopic.

ImportProgress

Indicates the progress of the import.

(c) Sparx Systems 2018 Page 34 of 97

Page 35: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Import a MagicDraw MDZIP File

Enterprise Architect supports importing UML models fromMDZIP files generated by MagicDraw 17.0.1 and above.

Access

Select your target Package in the Project Browser, then useone of the methods outlined here to open the 'Import Modelfrom XMI' dialog.

On the 'Import Model from XMI' dialog, click on the OtherXML Formats button, then choose the option 'MDZIP File'.

Ribbon Publish > Model Exchange > Import XMI> Import Model XMI : Other XML FileFormats > MDZIP File

ContextMenu

Right-click on Package > Import/Export> Import Package From XMI : OtherXML File Formats > MDZIP File

KeyboardShortcuts

Ctrl+Alt+I : Other XML File Formats >MDZIP File

Import UML Model from MDZIP File(s)

(c) Sparx Systems 2018 Page 35 of 97

Page 36: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Option Action

Package Displays the name of thecurrently-selected Package.If this is not the required Package, clickon the button and select the correctPackage.

Filename Click on the button.The 'Select MDZIP File(s)' dialogdisplays, from which you can selectmultiple files.Select the required MagicDraw MDZIPfile or files (use Shift+click or Ctrl+clickto select several files), then click on theOpen button to return to the 'Import FromMDZIP File(s)' dialog.

SelectedFile(s)

Lists the *.MDZIP files you haveselected for import.

Write LogFile

Select this checkbox to write a log ofimport activity.The log file is saved in the directory fromwhich the files are being imported, withthe name   import.log.

(c) Sparx Systems 2018 Page 36 of 97

Page 37: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Import Click on this button to import the MDZIPfile(s) into Enterprise Architect.

Close Click on this button to close this dialog.

Help Click on this button to display this Helppage.

ImportProgress

Indicates the progress of the import.

Notes

In the Corporate, Unified and Ultimate editions of·

Enterprise Architect, if security is enabled you must have'Import XMI' permission to import Packages from XMI

(c) Sparx Systems 2018 Page 37 of 97

Page 38: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Limitations of XMI

Whilst XMI is a valuable means of defining a UML modelin a common format, it is relatively limited in the amount ofadditional information it can tolerate using the standardsyntax.

Notes on Enterprise Architect

A lot of information from an Enterprise Architect modelmust be converted to Tagged Values, which import intoother modeling systems as additional information or areignored completely. Enterprise Architect can both generateand read:

XMI 1.0 and 1.1 using UML 1.3 format·

XMI 1.2 using UML 1.4 format, and·

XMI 2.1 using UML 2.x format·

Round-tripping model elements using XMI in EnterpriseArchitect is possible using XMI 1.1 or XMI 2.1; XMI 1.1uses the additional Tagged Values to store the UML 2.xinformation - this ensures model completeness whenround-tripping UML 2.x model elements using XMI 1.1.

Enterprise Architect exclusively uses XMI 1.1 forround-tripping models using Version Control.

(c) Sparx Systems 2018 Page 38 of 97

Page 39: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Notes for Exporting to Rose and Other Tools

There are discrepancies in the Unisys/Rose implementationwith regard to spelling mistakes and slightly different syntaxto the official XMI 1.1 specification, so problems mightoccur. The way Packages are arranged in different modelscan impact successful import into other systems;experimentation is the only work around for this problem.

Some parts of the XMI import/export process do not workas expected in products such as Rational Rose; for example,Note Links are not supported, and State Operations importbut do not appear in diagrams. Rational Rose only supportsimport of a full project, not a single Package.

For best results, it is recommended that you keep the modelelements to export to Rose simple and that they conform asclosely as possible to the UML 1.3 specification.

(c) Sparx Systems 2018 Page 39 of 97

Page 40: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

The UML DTD

When you import or export Packages from an EnterpriseArchitect model to XMI, the import or export process can bevalidated using a Data Type Definition (DTD). SeveralDTDs for XMI/UML exist; the OMG defines a standardUML1.3 DTD for use in XMI 1.1, and Enterprise Architectuses an extension of this with some additional elementextensions for non-standard UML types, such as testingdetails.

The XML parser uses the DTD to validate the correctness ofthe model and to check that no syntactical errors haveoccurred. It is always best to use a DTD when movingPackages between Enterprise Architect models, as it ensurescorrectness of the XMI output and prevents attemptedimports of incorrect XML.

Whenever you read an XML file, the XML parser looks inthe current directory for the DTD - if specified - using theDOCTYPE element in the XML file. If the parser cannotfind the DTD, it records an error and aborts processing; theUML_EA.DTD file must be in the current XML output path(generated by default).

(c) Sparx Systems 2018 Page 40 of 97

Page 41: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

CSV Import and Export

Within Enterprise Architect, you can import and exportinformation about elements to and from comma-separatedvalue (CSV) text files. This involves up to three possibleactions.

Actions

Action Detail

Set UpSpecifications

To import and export element data fromEnterprise Architect using CSV files, youmust first set up one or more filespecifications.You do this because the specificationdefines what types of value from thespreadsheet are to be imported, and howthe information is translated between thespreadsheet and Enterprise Architect.

Import FromCSV

Once you have defined a CSV importspecification, you can read in majorelement characteristics from a CSV textfile.

Export To Once you have defined a CSV export

(c) Sparx Systems 2018 Page 41 of 97

Page 42: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

CSV specification it is possible to write outmajor element characteristics to a CSVtext file.

(c) Sparx Systems 2018 Page 42 of 97

Page 43: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

CSV Specifications

To import and export element data to and from EnterpriseArchitect using CSV files, you must first set up one or moreCSV file specifications. A file specification defines the:

Fields from the spreadsheet in the order they are imported·

or exported

Source or target filename (optional) and·

Delimiter between columns·

Once you have defined one or more specifications, you canselect one in the 'CSV Import/Export' dialog as the currentspecification to apply during an import or export action. Thefacility only imports and exports elements (within Packages)and their properties; items such as Class attributes cannot beimported or exported through this mechanism.

XMI import/export provides a solution to this limitation, asdoes use of the Automation Interface.

Access

Ribbon Publish > Model Exchange > CSV >CSV Exchange Specification

(c) Sparx Systems 2018 Page 43 of 97

Page 44: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Set Up a CSV Specification

Field Action

SpecificationName

If creating a new specification, type in aunique specification name.If editing an existing specification, clickon the drop-down arrow and select thespecification name.

Delimiter Click on the drop-down arrow and selectthe character delimiter to use betweenrecord fields.If a field contains an instance of thedelimiter, the field is exported wrapped in" (quotation marks) and any instances of "in the field are doubled (that is, "becomes "").

Notes Type in a brief description of thespecification.

DefaultFilename

Type in the default file location and filename to be used when importing andexporting.Alternatively, click on the button andbrowse for the location.

(c) Sparx Systems 2018 Page 44 of 97

Page 45: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

DefaultDirection

Click on the drop-down arrow and selectthe default action - 'Import' or 'Export'.Each specification can be used in eitherdirection, but this field provides thedefault.

DefaultTypes

Type in a comma-separated list to limitthe element types being exported; forexample:class,requirement,component,node,object.

If you specify element types, ONLY·

elements of those types are exported orimported; so, for the 'PreserveHierarchy' option to operate (ifselected) you must include Package asan element type, otherwise there are noPackages in which to preserve thehierarchyIf you do not specify any default·

element types, all elements includingPackages are exported or imported andthe hierarchy can be preserved

PreserveHierarchy

Select this checkbox to include fieldsgenerated by Enterprise Architect, toembed/reconstruct the Package hierarchy.

Available Click on the name of an available field,

(c) Sparx Systems 2018 Page 45 of 97

Page 46: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Fields and double-click on it to add it to theSpecification (it displays at the end of the'File Specification' list).Press and hold Ctrl while you selectseveral fields, but use the Add fieldbutton to transfer them all to the 'FileSpecification' list.

FileSpecification

Review the record fields alreadyassigned, listed in the order in which theyare plotted across the spreadsheet.If you want to change the sequence offields, click on a field name and click onthe or button to move the field nameup or down the list.

Add TaggedValue Field

Click on this button to add a TaggedValue column to the CSV Specification,to import or export the value that anelement has for a particular tag.A prompt displays to select one of twooptions:

Value - to import or export the content·

of the Tagged Value 'Value' field; acolumn heading with the prefix'TagValue_' is added to theSpecificationNotes - to import or export the content·

of the Tagged Value 'Notes' field (some

(c) Sparx Systems 2018 Page 46 of 97

Page 47: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Tagged Values use the 'Notes' field toaccommodate long values, such as<memo> text); a column heading withthe prefix 'TagNotes_' is added to theSpecification

In each case, the 'Add Tag Value Field'dialog displays. Select either the:

'Global Tagged Values' radio button, or·

'Tagged Values from the selected·

Element' radio button, click on theOther Element button and browse forthe name of the element that containsthe Tagged Value

Click on the 'Tagged Value' fielddrop-down list and select the requiredTagged Value, then click on the OKbutton.

Add Field Click on this button to move all selectedfields from the 'Available Fields' list tothe 'File Specification' list.

RemoveField

Click on this button to move all selectedfields from the 'File Specification' listback to the 'Available Fields' list.

New Click on this button to clear all the dialogfields to create a new specification.

(c) Sparx Systems 2018 Page 47 of 97

Page 48: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Save Click on this button to save all changes tothe currently selected specification.

Save As Click on this button to save the currentspecification under a new name.

Delete Click on this button to delete the currentspecification.

Close Click on this button to close this dialog.

Notes

In the Corporate, Unified and Ultimate editions of·

Enterprise Architect, if security is enabled you must have'Export XMI', 'Import XMI' and 'Configure Resources'permissions to use the 'CSV Import/Export Specifications'option

In 'Available Fields' and 'File Specification', the record·

fields 'Created Date' and 'Modified Date' are not set whenimported from CSV

(c) Sparx Systems 2018 Page 48 of 97

Page 49: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Using Preserve Hierarchy

The 'Preserve Hierarchy' option on the 'CSV Import/ExportSpecification' dialog includes fields generated by EnterpriseArchitect to embed/reconstruct the Package hierarchy in aCSV import or export.

When selected, the 'Preserve Hierarchy' option inserts twofields into the CSV specification that are:

automatically populated by Enterprise Architect on export·

and

used to reconstruct the exported Package's hierarchy upon·

import

It is highly recommended that you do not change thesefields if they have been automatically generated byEnterprise Architect's CSV exporter.

Inserted Fields

Field Action

CSV_KEY A unique identifier for the currentelement.This key is unique per export; subsequentexports produce different keys for thesame set of elements.

(c) Sparx Systems 2018 Page 49 of 97

Page 50: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

CSV_PARENT_KEY

The corresponding CSV_KEY of thecurrent element's parent.If the field is left blank or references anon-existent CSV_KEY, the element isadded to the top level of the Package.

External Data

If you intend to import hierarchical information from aspreadsheet that was not populated by exporting data fromEnterprise Architect, you must add these two fields to yourspreadsheet as the last two columns, and populate thecolumns yourself. For example:

(c) Sparx Systems 2018 Page 50 of 97

Page 51: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

CSV Export

It is possible to export information about elements fromyour project in Enterprise Architect to a CSV text file. Inthis operation you make use of a CSV export specification.

If you intend to re-import the exported information intoEnterprise Architect at some point, it is recommended thatyou include the 'GUID' field in the CSV exportspecification. This helps Enterprise Architect to identify andupdate existing elements, rather than create duplicates.

Access

Ribbon Publish > Model Exchange > CSV >CSV Import/Export

Export Data in CSV Format

Field Action

Package Confirm the name of the current selectedPackage.

(c) Sparx Systems 2018 Page 51 of 97

Page 52: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Specification Click on the drop-down arrow and selectthe name of the existing exportspecification to use.

Edit/New Click on this button to edit the exportspecification or create a new one. The'CSV Import/Export Specification' dialogdisplays.

File Type in the name and path of the file toexport to, or click on the button andbrowse for the file.

Types Type in the element types to export: leaveblank for all, or enter a comma-separatedlist of types.If you specify element types, ONLYelements of those types are exported;therefore, to enable the 'PreserveHierarchy' option in the specification tooperate (if selected) you must include'Package' as an element type, otherwiseno Packages are exported in which topreserve the hierarchy.If you do not specify any element types,all elements including Packages areexported and the hierarchy can bepreserved.

(c) Sparx Systems 2018 Page 52 of 97

Page 53: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Code Page Displays the Code Page used whenimporting and exporting. This can bechanged via the 'Source CodeEngineering' page of the 'Manage ProjectOptions' dialog.

Action Click on the 'Export' radio button toexport to file.

ExportColumnNames

Select this checkbox to include thecolumn names of the fields in the exportfile.

IncludeSubfolders

Select this checkbox to includesubfolders and their child elements in theexport.

Print Results Click on this button to print out the resultlist.

View File Click on this button to view the resultantCSV file with the default Windowsapplication for CSV files.

Run Click on this button to execute the export.

Close Click on this button to cancel the exportand exit the dialog.

(c) Sparx Systems 2018 Page 53 of 97

Page 54: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Notes

In the Corporate, Unified and Ultimate editions of·

Enterprise Architect, if security is enabled you must haveboth 'Export XMI' and 'Import XMI' permissions to usethe 'CSV Import/Export' option

(c) Sparx Systems 2018 Page 54 of 97

Page 55: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

CSV Import

It is possible to import information about elements into yourproject in Enterprise Architect from a CSV text file. In thisoperation you make use of a CSV import specification. Youimport the CSV file into a selected Package; if this Packageor any element within the Package has a lock on it, youcannot import the CSV file into it. The 'Import' option on thedialog is grayed out.

The format and content of the CSV source data file shouldresemble this:

Access

Ribbon Publish > Model Exchange > CSV >CSV Import/Export

ContextMenu

Right-click on Package > Import/Export |CSV Import/Export

(c) Sparx Systems 2018 Page 55 of 97

Page 56: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Import Data in CSV Format

Field Action

Package Confirm the name of the current selectedPackage.

Specification Specify the name of the importspecification to use.

Edit/New Edit the import specification or create anew one.

File Specify the spreadsheet filename toimport from.

Types Not used for import.

Code Page Displays the Code Page used whenimporting and exporting. This can bechanged via the 'Source CodeEngineering' page of the 'Manage ProjectOptions' dialog.

Action Select the 'Import' radio button to importfrom the file (grayed-out if the Package

(c) Sparx Systems 2018 Page 56 of 97

Page 57: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

or a child item in the Package is locked).

Print Results Print out the result list.

View File View the source CSV file with the defaultWindows application for CSV files.

Run Perform the import.

Close Click on this button to close this dialog.

Notes

When importing, Enterprise Architect checks the·

specification to see if there is a 'GUID' field included; ifthere is, Enterprise Architect attempts to locate theelement identified by the GUID and, if successful, updatesthe current element rather than creating a new one

If no 'GUID' field is defined, or Enterprise Architect·

cannot locate the identified element, a new element iscreated and placed in the current Package; during import,'Type' is a mandatory field in the source file and mustmatch one or more of the legal Enterprise Architectelement types: for example: Requirement, or Class

In the Corporate, Unified and Ultimate editions of·

Enterprise Architect, if security is enabled you must have

(c) Sparx Systems 2018 Page 57 of 97

Page 58: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

both 'Export XMI' and 'Import XMI' permissions to usethe 'CSV Import/Export' option

(c) Sparx Systems 2018 Page 58 of 97

Page 59: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Controlled Packages

A Controlled Package is a Package configured to save andload in XML format to a named file; the XML output isUML 1.3 compliant XMI, with Enterprise Architectextensions to support diagrams and additional modelelements. Controlled Packages are a powerful means of'externalizing' parts of an Enterprise Architect model.

Package XML is standard XMI-compliant output that can beloaded into any XML viewer, or used by any XML-basedtool to perform manipulations and extracts, such asdocument or code generators.

Controlled Packages appear in the Project Browser with asmall colored rectangle to the left of the Package icon, asshown for the CIM Package:

Using Controlled Packages you can support:

Widely distributed development by having team members·

submit Packages in the form of XML for import into acentral Enterprise Architect repository

Version control, by writing model elements in XML text·

files suitable for version control using standard versioncontrol softwareUsing XMI this way, you can manually connect tothird-party version control software outside the EnterpriseArchitect environment; Enterprise Architect internallysupports the configuration of version control through SCC

(c) Sparx Systems 2018 Page 59 of 97

Page 60: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

and CVS

Import and export of model elements between different·

modelsFor example, a Class library can be re-used in manymodels and kept up to date in target models usingControlled Packages, reloading Packages as requiredwhen new versions of the Class model become available

Notes

If you are importing an XMI 1.1 file that was previously·

exported with a UML_EA.DTD (Data Type Definition)file, the UML_EA.DTD file must be present in thedirectory into which the XMI file is being written; anerror occurs if the UML_EA.DTD file is absent

When you select to apply a DTD during an XMI 1.1·

export, the UML_EA.DTD file is written to the outputdirectory into which the XML files are written (unless theUML_EA.DTD file is already present in the directory); noerror is generated if the UML_EA.DTD file is not presentin this directory during the XMI export

(c) Sparx Systems 2018 Page 60 of 97

Page 61: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Controlled Package Menu

If you are working on a Package that is not itself underversion control (but that might contain child Packages thatare under version control), you select your Package controloptions from the 'Controlled Package' menu.  

(For a Package that is directly under version control, youuse the 'Package Version Control' menu.)

Access

ContextMenu

Project Browser > Right-click onPackage > Package Control

Package Control Options

Option Action

LockPackage

Select this option to apply a lock on theselected Package.  (This option is only displayed when usersecurity is enabled in User/Group lockingmode)

(c) Sparx Systems 2018 Page 61 of 97

Page 62: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Apply/Release User Lock

Select this option to apply or release auser lock on the selected Package.  (This option is only displayed when usersecurity is enabled in 'Require User Lockto Edit' locking mode)

Configure(varioussettings forthe Package)

Select this option to display the 'PackageControl Options' dialog, and specifywhether this Package (and its childPackages) is controlled and the file it iscontrolled through.Shortcut: Ctrl+Alt+P

PackageBaselines

Select this option to create a Baseline ofthe current Package, or compare thecurrent Package with a previous Baseline.Shortcut: Ctrl+Alt+B

Check InBranch

Select this option for the selected branchof the model (that is, the selected Packageand all of its child Packages), to displaythe 'Select Packages to Check In' dialog,listing all version controlled Packageswithin that branch that are checked out toyou.You can then select Packages in thedisplayed list, to be submitted forcheck-in.

(c) Sparx Systems 2018 Page 62 of 97

Page 63: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Check OutBranch

Select this option for the selectedPackage, to check out the Package andrecursively check out all of its containedsub-Packages.The system retrieves the latest version ofthe Packages from the central repository,overwriting the current Packages.After check out, the Packages areavailable for editing.

Save Packageto File

Select this option to save a ControlledPackage to an XMI file.Shortcut: Ctrl+Alt+S

LoadPackage fromFile

Select this option to load apreviously-saved XMI file.Shortcut: Ctrl+Alt+L

ViewPackage XMI

Select this option to display the PackageXMI after the Package has been exportedto XMI.Shortcut: Ctrl+Alt+X

ComparePackage withXMI file

Select this option to compare the currentPackage with a previously-saved XMIfile of the Package.

(c) Sparx Systems 2018 Page 63 of 97

Page 64: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Set VisibilityLevel

This menu item is only available in amodel that has been set up for VisibilityLevels, and when it is being accessed viaa Pro Cloud server connection. It isprimarily used by System Administratorsto manage user access to Packages withinthe model.You use this option to set a VisibilityLevel on a Package, which applies to thePackage and its child structures. TheVisibility Level has a matching useraccess level set in user security. A userwith a given access level can only see,access and update Packages with theequivalent Visibility level or lower.Select from the list of values, which startat 0 (no restriction on access) and can goup to 5 (for Packages requiring highsecurity of access). You will only be ableto set Visibility Levels at or below theaccess level to which you have beenassigned.To remove a visibility level from aPackage (and all its children), simply setthe Visibility Level back to zero. Anyuser can then view and update thePackage (within the limitations of anyuser security controls on their access tofunctions).

(c) Sparx Systems 2018 Page 64 of 97

Page 65: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Add Branchto VersionControl

Select this option to apply version controlto all Packages within the selected modelbranch, in a single operation.

Export asModelBranch

Select this option to export a newlycreated model branch from your ownprivate copy of a model.

Import aModelBranch

Select this option to retrieve a modelbranch and import it into either the sourcemodel or another model.

Get Package(for versioncontrol)

Select this option to gain access fromPackages in the version-controlledrepository that is currently available inyour model.

Get AllLatest (forversioncontrol)

Select this option to retrieve the latestversion of the Package from therepository. The option is available onlyfor Packages that are checked in.The alternative option 'Get Latest' - ifdisplayed - is not intended for sharingproject files and should only be usedwhen users have their own individualdatabases.

Scan XMI Select this option to scan the Package

(c) Sparx Systems 2018 Page 65 of 97

Page 66: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

andReconcileModel

XMI files associated with each of theproject's controlled Packages and restoreany diagram objects or cross-referencesthat are detected as missing from theproject.This function is useful in teamenvironments where each user maintainstheir own private copy of the modeldatabase (that is, multiple private projectfiles) and model updates are propagatedthrough the use of controlled Packages. Itprovides no benefit when the model ishosted in a single shared database that isaccessed by all team members.Each controlled Package is comparedwith its associated XMI file and, if thecross-reference information in the modeldoes not match the XMI, the systemupdates the model with the informationfrom the XMI and records the update inthe System Output window.You can roll back such updates byright-clicking on the entry in the SystemOutput window and selecting the'Rollback Update' option (or 'RollbackSelected Updates' if multiple entries areselected).Closing the model clears the entries in theSystem Output window; an entry in the

(c) Sparx Systems 2018 Page 66 of 97

Page 67: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

window is also cleared as and when youroll-back the update for it.This functionality is invokedautomatically as part of the 'Get AllLatest' operation.When working in an environment thatuses a Private Model deployment andyour model contains a significant numberof cross-Package references, it isrecommended that you invoke 'Scan XMIand Reconcile Model' from time to time,following the re-importation of controlledPackages - for example, after using 'GetLatest' to update a number of Packages -or after performing a number of Packagecheck-outs.Note: As a general rule, avoid running'Scan XMI and Reconcile Model' whileyou have uncommitted changes in yourmodel. Generally, you:

Check-out a number of Packages.1.Invoke 'Scan XMI and Reconcile2.Model'.Make your modifications.3.Commit any outstanding changes4.before you check-out more Packagesand run 'Scan XMI and ReconcileModel' again.

(c) Sparx Systems 2018 Page 67 of 97

Page 68: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Re-synchStatus WithVC Provider

(Version controlled Package.)Select this option to update the versioncontrol status value recorded for theselected Package in the EnterpriseArchitect project to match the valuereported by the version control provider,without performing an XMI import orexport.

VersionControlSettings

Select this option to display the 'VersionControl Settings' dialog.

(c) Sparx Systems 2018 Page 68 of 97

Page 69: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Configure Packages

In order to configure a Package to save and load in XMLformat to a named file, you use the 'Package ControlOptions' dialog to flag the Package as being controlled andto set a number of options. These options include setting theXMI filename to save to/load from, the type of XMI toimport and export, and whether to export and/or import theXMI in a batch process. When the Package is configured,this is indicated by a small colored rectangle on the left ofthe 'Package' icon in the Project Browser, as shown for theRQ01: Formal Requirements Package.

Access

Select a Package in the Project Browser, then:

Ribbon Configure > Version Control > PackageConfiguration

KeyboardShortcuts

Ctrl+Alt+P

(c) Sparx Systems 2018 Page 69 of 97

Page 70: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Configure a controlled Package

Option Description

ControlPackage

Select the checkbox to indicate that this isa controlled Package.

For allpackages,createplaceholdersfor externalreferences

Select to force all XMI 1.1 imports of thisPackage to exclude incomingrelationships and instead create externalreferences.This overrides the 'Create placeholdersfor missing External References duringXMI 1.1/2.1 Import' checkbox in theXML Specifications options for a user, ifthat checkbox is not selected.

VersionControl

Leave this field set to '(None)', to managethe Package under XMI control.The 'Package Control Options' dialog isalso used in adding a Package to VersionControl and, in this context, is describedunder the Version Control section.

XMIFilename

Type or browse for the path and XMI filename into which to export the Packagedata and from which to import it.

(c) Sparx Systems 2018 Page 70 of 97

Page 71: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

You can also enter Local PathSubstitution strings; for example, an XMIlocal path definition where: myLocalPath="C:\Documents andSettings\John\Desktop\EA Models"So that %myLocalPath%\CIM.xml isequivalent to: C:\Documents andSettings\John\Desktop\EAModels\CIM.xml

UML/XMIType

Click on the drop-down arrow and selectthe type of XMI to be generated; optionsinclude:

Enterprise Architect XMI 1.1·

Enterprise Architect XMI 2.1·

For complete import/export roundtripping of Packages, currently onlyEnterprise Architect XMI 1.1 issupported. This format uses additionalTagged Values to store the model's UML2.x information.

Version ID Type the version number you want toapply to the Package.This field is the same as the 'Version'field on the Package 'Properties' dialog;any change to either field updates the

(c) Sparx Systems 2018 Page 71 of 97

Page 72: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

other.

Owner Defaults to the name of the Packageowner; if necessary, type or select adifferent name.

Use DTD (Optional)  Select the checkbox to use aData Type Definition (DTD) for theimports and exports.(This option is not available for theEnterprise Architect XMI/UML 1.3 orRational Rose/Unisys UML 1.3 types.)

LogImport/Export

(Optional) Select the checkbox to logimport and export activity to a log file.

Batch Import (Optional) Select the checkbox to markthe Package as a Batch Import Package.

Batch Export (Optional) Select the checkbox to markthe Package as a Batch Export Package.

Includesub-packages

(For an Enterprise Architect XMI/UML1.3 export)  Select the checkbox toinclude the entire sub-Package hierarchyof this branch in the exported XMI(default).Deselect the checkbox to include only the

(c) Sparx Systems 2018 Page 72 of 97

Page 73: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

immediate contents of the Package in anXMI export (XMI stubs).

OK Click on this button to set the PackageControl options and close the dialog.

Notes

In the Corporate, Unified and Ultimate editions of·

Enterprise Architect, if security is enabled you must have'Configure Packages' permission to configure controlledPackages and Package properties

For batch import, the file date of the XMI file is stored;·

you can bypass the batch import if there is no change -that is, the file date of the last import matches that of thecurrent file

(c) Sparx Systems 2018 Page 73 of 97

Page 74: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Remove Package from Control

If required, you can remove the control from a Package.Before removing the Package control, and if it is being usedfor version control, you must check in the Package.

Access

Select a Package in the Project Browser, then:

Ribbon Configure > Version Control > PackageConfiguration

KeyboardShortcuts

Ctrl+Alt+P

Remove control from a Package

Step

Action

1 Select the Package and click on the 'Configure' menuoption.The 'Package Control Options' dialog displays.

(c) Sparx Systems 2018 Page 74 of 97

Page 75: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

2 Deselect the 'Control Package' checkbox.If the Package is under version control, this sets the'Version Control' field to '(None)'.

3 Click on the OK button to remove Package control.Package control for the selected Package has nowbeen removed.

Notes

When disconnecting a Package from version control, the·

association between the Package and the exported XMLfile is removed from your model; however, the XML fileitself is not removed from version control, nor is it deletedfrom your local version control working copy folder

This is because it is possible for another model to be usingthe version controlled Package and still referencing theassociated version controlled XML file

(c) Sparx Systems 2018 Page 75 of 97

Page 76: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Save a Package

Once you have correctly configured a Package, you can savethe controlled Package to the designated XMI file.

Access

Select a Package in the Project Browser, then:

Ribbon Publish > Model Exchange > PackageControl > Save to File

ContextMenu

Right-click on Package > PackageControl > Save Package to File

KeyboardShortcuts

Ctrl+Alt+S

Save a controlled Package to file

Step

Action

1 Select the Package and the Save Package to File

(c) Sparx Systems 2018 Page 76 of 97

Page 77: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

menu option.The export process executes automatically accordingto your configured preferences, overwriting anyexisting file.

Notes

If you are using a version control Package in conjunction·

with the exported Package files, you must check out theXMI file first to enable Enterprise Architect to overwritethe existing version

(c) Sparx Systems 2018 Page 77 of 97

Page 78: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Load a Package

If a Package has been marked for control it is displayed inthe Project Browser with a red rectangle to the left of thePackage icon. If you have previously saved the controlledPackage, you can reload it.

Access

Select a Package in the Project Browser, then:

Ribbon Publish > Model Exchange > PackageControl > Load from File

KeyboardShortcuts

Ctrl+Alt+L

Load a controlled Package from an XMI file

Step

Action

1 Select the Package and the 'Load from file' ribbonoption.

(c) Sparx Systems 2018 Page 78 of 97

Page 79: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

If you have configured the Package Control details,the system prompts you to confirm the import.

2 Click on the Yes button to confirm the import.The current Package is deleted and the savedPackage is imported.

Notes

Importing deletes the current Package entirely from the·

model, and the action cannot be undone; you must becareful not to lose any current changes or information

(c) Sparx Systems 2018 Page 79 of 97

Page 80: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Batch XMI Export

You can export a group of Controlled Packages to XMI inone step.

Access

Ribbon Publish > Model Exchange > Export XMI> Batch Export Controlled Packages

Export a group of Controlled Packages toXMI

Step

Action

1 Open the 'Batch XMI Export' dialog using one of theaccess methods.

2 The 'Batch XMI Export' dialog lists all of theControlled Packages in the current Project.Select the checkbox against each Package to includein this export run.

(c) Sparx Systems 2018 Page 80 of 97

Page 81: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Select the 'Select All' checkbox to select allPackages in the list.

3 Select the 'Restore Cross References WithoutPrompting' checkbox to automatically restore anymissing cross-Package references without displayinga prompt.

4 To save this configuration as the default, click on theSave Settings button.

5 Click on the Run Export button.Enterprise Architect cycles through each checkedPackage and exports it using the options specified inthe 'Package Control Options' dialog.As long as a valid filename exists, EnterpriseArchitect exports the Package to XMI and proceedsto the next Package.

Notes

The 'Restore Cross References Without Prompting'·

checkbox is enabled only if the option 'Report CrossPackage Reference Deletions (XMI 1.1)' is set on the'XML Specifications' page of the 'Preferences' dialog

The option is applicable only to XMI 1.1 Controlled·

(c) Sparx Systems 2018 Page 81 of 97

Page 82: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Packages

(c) Sparx Systems 2018 Page 82 of 97

Page 83: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Batch XMI Import

You can import a group of Controlled Packages from XMIinto Enterprise Architect in one step.

As the system processes each Package, it updates the 'Status'column against each Package name on the 'Batch XMIImport' dialog.

If the import is successful, Enterprise Architect updates·

the Package status to 'Imported'

If the import is unsuccessful, Enterprise Architect updates·

the Package status to 'Not Imported'

Common reasons for an import to fail include:

The Package not being correctly configured·

The last import file date matches the import date of the·

file currently on disk

Access

Ribbon Publish > Model Exchange > Import XMI> Batch Import Controlled Packages

Import a group of Controlled Packages from

(c) Sparx Systems 2018 Page 83 of 97

Page 84: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

XMI

Step

Action

1 Open the 'Batch XMI Import' dialog using one of theaccess methods.

2 The 'Batch XMI Import' dialog lists all of theControlled Packages in the current Project.Select the checkbox against each Package to includein the import.Select the 'Select All' checkbox to select allPackages in the list.

3 To save this configuration as the default, click on theSave Settings button.

4 Click on the Run Import button.Enterprise Architect cycles through each checkedPackage and imports it.

Notes

To avoid re-importing the same module multiple times,·

(c) Sparx Systems 2018 Page 84 of 97

Page 85: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

select the Check file date before import checkbox;Enterprise Architect then does not import a file if the lastimport file date matches that of the one currently on disk

(c) Sparx Systems 2018 Page 85 of 97

Page 86: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Manual Version Control with XMI

You can use XMI to support version control by writingmodel elements in XML text files suitable for use withstandard version control software.

Using XMI in this manner enables you to manually connectto third-party version control software outside the EnterpriseArchitect environment.

Enterprise Architect internally supports the configuration ofversion control through SCC and CVS configurations.

Prepare for using XMI for version control

Step

Action

1 Select suitable Packages in the Project Browser, tobe marked as Controlled Packages.

2 Configure these with filenames that are visible to aversion control system of your choice.

3 Save the Controlled Packages to establish a modelbase and check these into the version control system.

(c) Sparx Systems 2018 Page 86 of 97

Page 87: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Apply version control

Step

Action

1 Continue working on a Package until versioning isrequired.

2 Check out the Package XMI file from the versioncontrol system.

3 Save the relevant Package using the ControlledPackage support.

4 Check the Package back into the version controlsystem.

Recover an earlier version

Step

Action

1 Save the current version first.This is important, because the Package is completely

(c) Sparx Systems 2018 Page 87 of 97

Page 88: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

deleted during the import process.If necessary, manually update the version controlsystem.

2 Get the required Package version from the versioncontrol system.

3 Select the Package to reload.

4 Select the 'Package Control | Load package from file'menu option to import the previous version.Enterprise Architect deletes the Controlled Packageand restores the previous version.

(c) Sparx Systems 2018 Page 88 of 97

Page 89: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Report Deletion of Cross PackageReferences

Your model might contain at least one XMI 1.1 ControlledPackage that is also used in other models, but notnecessarily in the same context.

For example, consider the combination of Projects andPackages described in this figure:

deployment Project X

Package B

+ Element B1+ Element B2

Package A

+ Element A1+ Element A2

Specialized Package X

+ Element X1+ Element X2

X depends on B

X depends on A

deployment Project Y

Specialized Package Y

+ Element Y1+ Element Y2

Package A

+ Element A1+ Element A2

Package B

+ Element B1+ Element B2

Y depends on A

Y depends on B

Two common packages, 'Package A' and 'Package B', areshared across two separate projects, 'Project X' and 'ProjectY', through the use of XMI Package files. From the point ofview of the common Packages, each of these projects is'incomplete'. Project X does not contain 'SpecializedPackage Y' and similarly, Project Y does not contain'Specialized Package X'.

Problem

(c) Sparx Systems 2018 Page 89 of 97

Page 90: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

When 'Package B' is exported from 'Project X', its XMI filewill not contain the cross-package reference 'Y depends onB', as that relationship does not exist in 'Project X'. If theXMI file is subsequently imported into 'Project Y', therelationship 'Y depends on B' will be removed from 'ProjectY'.

Solution

You can easily check for and preserve the cross-Packagerelationships by selecting the option 'Report Cross PackageReference Deletions (XMI 1.1)' in the 'Preferences' dialog('Start > View > Preferences' ribbon option, then select the'XML Specifications' tab). When you save a controlledPackage, Enterprise Architect compares the XMI for thatsave with the most recent XMI 1.1 revision of the Package.Any items that are missing from the Package are listed onthe 'Missing Cross References' dialog.

Actions

Action Detail

Decide whichcross-references to merge

In some cases Enterprise Architect cannotdetermine whether a cross-reference ismissing or intentionally deleted by the

(c) Sparx Systems 2018 Page 90 of 97

Page 91: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

user. When the 'Missing CrossReferences' dialog displays, the basicanalysis process should be:

If the item was deleted intentionally,·

deselect the checkbox beside itIf the item was not deleted·

intentionally, its presence in the listsuggests it is a missing cross referenceand you should leave the checkboxselected

Mergemissing items

Items missing from the exported Packageare listed in the 'Missing CrossReferences' dialog. To regenerate theminto the XMI file that is being saved:

Select the checkbox against each item·

typeClick on the OK button·

Items of any type that you do not selectare omitted from the saved XMI file.

Abort orcancel thisXMI Export

If you do not want to proceed with theexport (or Check-in or Put Latest)operation:

Click on the Cancel button·

Review thedetails of an

To display the details of an entry on the'Missing Cross References' dialog:

(c) Sparx Systems 2018 Page 91 of 97

Page 92: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

entry Double-click on the type name·

The details of each item are shown on the'Missing <item type>' dialog. For anyitems where information is missing fromthe XMI file, the missing details aregrayed-out.To find the item with the missingcross-reference in the Project Browser,either:

Right-click on the entry in the list and·

select the 'Find in Project Browser'option, orClick on the item and press Alt+G·

Copy a valuefrom acolumn onthe dialog tothe clipboard

To preserve a copy of an item from thedialog on the clipboard:

Click on the column value to highlight·

it; the selected value is shown in thebottom left corner of the dialogSelect the text in the bottom left corner·

and press Ctrl+C to copy that value tothe clipboard

Notes

If you are not sharing any common packages between·

(c) Sparx Systems 2018 Page 92 of 97

Page 93: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

multiple projects, then detection of missing crossreferences is not necessary, and you should disable thefeature by deselecting the 'Report Cross PackageReference Deletions (XMI 1.1)' checkbox.

(c) Sparx Systems 2018 Page 93 of 97

Page 94: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Project Data Transfer

In normal system maintenance, it is likely that at some pointyou need to relocate data between storage systems. In anyedition of Enterprise Architect, you might need to transferall records from one project file to another (recommendedafter serious network crash or repeated database corruption).Project files can be either .eap (Access) files or .feap(Firebird) files, and you can transfer from one file type tothe other.

In the Corporate, Unified and Ultimate editions ofEnterprise Architect, you might need to:

Transfer an existing project file to a DBMS repository·

such as SQL Server or MySQL

Transfer a DBMS repository to an existing project file·

Move a repository from one DBMS to another (including·

moving between servers using the same DBMS)

Copy all records from a JET 3.5 to JET 4 (Access 2000 or·

XP) repository - or back the other way

Access

Ribbon Configure > Model > Transfer > ProjectTransfer

(c) Sparx Systems 2018 Page 94 of 97

Page 95: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Perform a project data transfer

Step

Action

1 Click on the radio button for the required transfertype:

File to File·

DBMS to File·

File to DBMS·

DBMS to DBMS·

2 In the 'Source Project' and 'Target Project' fields,type or select the name or connection string for theSource and Target projects.

3 If you want to capture the transfer in a log file, selectthe 'Logfile' checkbox and browse for theappropriate log file location.

4 Click on the Transfer button.

5 It is good practice to do a Project Compare after thisprocess to verify that all records are written.

(c) Sparx Systems 2018 Page 95 of 97

Page 96: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

Notes

Take a backup of the target project to ensure that you can·

recover any important information it already contains; in atransfer, all records in the target repository are overwritten

You cannot move a model from a source .eap file from an·

Enterprise Architect version earlier than 3.5.0

When performing a .eap file to DBMS transfer, if the .eap·

file has replication enabled, the replication must beremoved before performing the transfer

When transferring a model to a DBMS, you cannot·

transfer the data into an empty database - the tables mustalready exist; if they do not, run the corresponding scriptsupplied by Sparx Systems to create the required tables

When transferring a model into a project file, similarly,·

the target project file must already exist, to provide thedata structures to transfer data into

In the Corporate, Unified and Ultimate editions of·

Enterprise Architect, if security is enabled you must have'Transfer Data' permission to transfer project data betweenrepositories

(c) Sparx Systems 2018 Page 96 of 97

Page 97: User Guide Series · Import a Rhapsody Model32 Import a MagicDraw MDZIP File35 Limitations of XMI38 The UML DTD40 CSV Import and Export41 CSV Specifications43 Using Preserve Hierarchy49

User Guide - Model Exchange 26 July, 2018

(c) Sparx Systems 2018 Page 97 of 97


Recommended