Previous Next
agilian_user_guide Chapter 7 - Export and Import

Chapter 7 - Export and Import

Agilian facilitates excellent interoperability by allowing exchange of  UML diagrams and models via XMI. Apart from this, you also can import models created previously from IBM Rational Rose.

This chapter guides you through the process of importing and exporting a VP project, an XML file or an XMI file. You can also learn how to export a VP project as an image and how to import a IBM Rational Rose Project.

In this chapter:

Exporting Diagram as Images

The images exported can be inserted to external documents for easier distribution. Here are the types of image Agilian support exporting:

Exporting the Active Diagram as an Image

This feature exports the active diagram as an image file. To export the active diagram as an image file, perform one of the following actions:
Figure 7.1 - Enable Import and Export toolbar
In both cases, a file chooser dialog box will appear where you can specify the output of the image file.

Exporting Diagrams as Images

This feature exports one or more diagrams as images. To export the active diagram as image file, perform one of the following actions:
In both cases, the Diagram Exporter dialog box will be displayed. You can specify which diagrams to export, and preview the exported image. After you have configured the export settings click Export to export the diagrams.
Figure 7.2 - Diagram exporter
Field Description
Output destination The Output destination is the directory where all the exported images are saved to. You can enter the path in the text field directly, or you can click on the ... button to browse for the directory.
Export type To select the image format of the exported image click on the pull-down box beside the Export type field and select the format you want to use.
Diagrams The Diagrams pane shows the diagrams in the current project. Check the checkbox beside the diagram you want to export. The number of selected diagrams is displayed at the bottom of the Diagram pane. The Preview pane also allows you to preview the exported image of the selected diagram.
Preview The Preview pane shows the preview of the exported image of the selected diagram in the Diagrams pane. You can check/uncheck the Show preview checkbox to enable/disable the preview.
You can select the size of the preview image by selecting from the pull-down box beside the Preview mode field. Selecting Stretch will show the image in scaled size that fits to the preview area, while selecting Real size will show the image in its actual size.
Anti-aliasing Anti-aliasing is a method which handles the staircase pixels of slanted lines and curves to make them look smoother. You can apply anti-aliasing to the exported images. To apply anti-aliasing to graphics, check the Graphics Anti-aliasing checkbox in the Anti-aliasing pane. Likewise, you can check the Text checkbox in the Anti-aliasing pane to apply anti-aliasing to text.
Auto overwrite existing files You can check the 'Auto overwrite existing files' checkbox to allow overwriting of files in the export process.
Max. Size Maximum size of exported images. If the diagram size is larger than the max. size, it will be resized.
Table 7.1

Slice diagrams

User can slice a large diagram into pieces(number of files), as well as restrict the size of the exported diagram.
Figure 7.3 - Slice diagrams
There are three slicing strategies. They are Fixed Slice, Free Slicing and Fixed Ratio.
Slicing strategies Description
 Fixed Slice
Fixed Slice is a simple strategy which slices exported diagram into pieces of the same size. The user specifies the number of columns and rows to slice and then the exported diagram will be sliced into specific pieces.
 Free Slicing
Users can customize how to slice the exported diagram by specifying the position of vertical slices and horizontal slices. It is particularly useful to prevent a shape from being sliced into pieces.
 Fixed Ratio
Fixed Ratio gains the benefits of Fixed Slice and Free Slicing. The width and height of pieces are the same but for the last row and column. Users can also customize the width and height of sliced pieces. Like Free Slicing, Fixed Ratio is size oriented. User modifies the size of pieces and Diagram Slicer calculates the number of row and column to slice.
Table 7.2

Exporting Diagrams to PDF format

You can export Agilian diagram to native PDF format. Since the exported PDF is of a small size, it can save a lot of space. Also, because the diagram in PDF is a vector, it is scalable.
There are two different options when you export:
            All the diagrams selected will be exported in the same PDF file. Each diagram will occupy one page.             Each diagram selected will be exported in one new PDF file.

To export diagram to PDF format:
1. Select File > Export > Diagrams as Image... in the main menu.
 Figure 7.4 - Select Diagrams as Image...

2. Diagram Exporter dialog box is displayed. Select the PDF format you want.
 Figure 7.5 - Select PDF format

3. Select ... to select the output destination or type it in the text box. If you select PDF(diagram per page) as the export type, you should type in a file name with .pdf as extension.
 Figure 7.6 - Type in Output destination

4. Select the diagram(s) you want to export and click Export to generate.
 Figure 7.7 - Select diagrams to export

5. Then, a dialog box is displayed telling you the diagram is exported. You may choose from the options Open File, Open Folder, Copy Path or Finish. Choose Open File to see the exported file.
Figure 7.8 - Export finished

6.  Only one file is created. In the exported file, you will find all the diagrams you have selected.
Figure 7.9 - Exported file

If you select PDF(diagram per file), you should type in a directory where the files should be saved in. After selecting the diagrams to export, click Export.
Figure 7.10 - Type in a directory

After exporting, you may select Open Folder to open the directory holding the exported file.
Figure 7.11 - Select Open Folder

The more diagram you selected, the more file you generated.
Figure 7.12 - Exported files in the designated directory

Each file exported will only contain one diagram.
Figure 7.13 - Exported file

Exporting and Importing VP Project File

Exporting VP Project File

Many hands make simple work.  Exporting a VP project file lets you split up a single large project into smaller sections, e.g. a few diagrams and focus on modifying and improving one section without affecting other components.  The exported files will then be the same as a normal VP project.  This means different sections can be worked on at the same time, and when all the sections are complete Importing the modified files back to the master project will merge the changes into the project. 

To export VP Project File:
1. Select File > Export > Agilian Project... in main menu.
Figure 7.14 - Export Agilian project

2. Export Project dialog box is displayed. Type in the Output destination.
Figure 7.15 - Export Project dialog box

3. Select the diagram you want to export.
Figure 7.16 - Select diagram to export

4. Open the project exported. The project only contains the diagram you selected in the Diagram Navigator.
Figure 7.17 - Diagram Navigator of exported project

Importing VP Project File

After you have edited the exported file, you can import it back to the master project. The modifications will then be merged to the master project.
1. Open the master project. Select File > Import > Agilian Project... in the main menu.
Figure 7.18 - Import Agilian Project

2. Select the project to be imported.
Figure 7.19 - Select a project to import

Diagram in the master project before import.
Figure 7.20 - Diagram before import

Diagram in the master project after import. The color of the use case 'Verify ID' has been changed.
Figure 7.21 - Diagram after import

Exporting and Importing XML

XML is a widely used standard for exchanging data. You can export the whole VP Project or just part of it to XML. After exporting, you can run your own application to read and update it. You can also import the XML file back to VP Project to reflect your changes.

Exporting XML

To export a project to XML:
1.Select File > Export > XML... in the main menu.
Figure 7.22 - Export XML

2. The Export to XML dialog box is displayed.
Figure 7.23 - XML dialog box displayed

3. Type in or select the output destination. The destination should be a directory because not only a XML file will be generated, but also some of the project file, such as image, will be generated.
Figure 7.24 - Text box for Output destination

4.Select the diagram needed to export and click Export to generate. If you want to export the whole project, you can check the check box Export project.
Figure 7.25 - Select Export

5. The XML file is generated.
Figure 7.26 - XML file is generated


Modifying XML


When you modify the XML of a project, the project will change accordingly. You can edit the XML file based on XML schema bundled. The XML schema in {installation folder}\bundled\project.xsd.
Figure 7.27 - XML schema

To edit XML:
1. Open the XML file in an editing program.
Figure 7.28 - Open XML file

2. Directly edit the file.
Figure 7.29 - Edit the file

Importing XML

You can import the modified XML to update your project.
To import XML:
1. Select File > Import > XML... from the main menu.
Figure 7.30 - Import XML file

2.Specify the import file path by selecting ... or typing the path in the text box. The import path should be path of a file. This is because the importer will search for the data.zip automatically.
Figure 7.31 - Specify the file path

3. The import of XML has completed.
Figure 7.32 - Import completed

Exporting and Importing XMI

XMI (Metadata Interchange) is the standard way for exchanging data between CASE tool. Agilian can cover most of the XMI versions and standards.
Here are the versions and standards we support:
Exporting:
Importing:

Exporting XMI

If the VP project is exported to XMI, users without Agilian can use other CASE tools to open the XMI to get the content of the project.
To export XMI:
1. Select File > Export > XMI... in main menu.
Figure 7.33 - Export XMI

2. Export XMI dialog box is displayed. You can choose the XMI Version of the export XMI.
Figure 7.34 - Export XMI dialog box

3. Specify the output file path by typing in the text box or select ... .If the file path does not have the extension .xmi, the exporter will append the extension to the path. Then, click OK to confirm.
Figure 7.35 - Specify the export file path

4. The XMI is generated.
Figure 7.36 - XMI file created

Importing XMI

You can import the XMI file which is modified by other users or other CASE tools, in order to update your project.
To import XMI:
1. Select File > Import > XMI... in the main menu.
Figure 7.37 - Import XMI

2. Import XMI dialog box is displayed. Specify the import file's path by typing in the text box or select ... and click OK to confirm.
Figure 7.38 - Specify import file's path


Exporting and Importing EMF-based UML2

Exporting to UML2

EMF stands for Eclipse Modeling Framework. In Agilian, we can support importing and exporting Eclipse XMI Standard. You can directly import and export the exported file to Eclipse UML2.
To export EMF-based UML2:
1. Select File > Export > XMI... in main menu. Export XMI dialog box is displayed.
Figure 7.39 - Export EMF-based UML2

2. Check the Export for UML2 check box. You can see the extension of export file path is .xmi.uml .Then specify the file path and click OK to confirm.
Figure 7.40 - Check Export for UML2 and specify file path

Importing to Eclipse UML2 Model

You can modify the exported file using Eclipse UML2.
To import the file:
1. Copy the exported XMI file to the eclipse project's directory or directly export the file there in the previous steps.
Figure 7.41 - Get the XMI file in project's directory in Eclipse

2. Select File > Refresh in main menu of Eclipse.
Figure 7.42 - Refresh eclipse

3. The Package Explorer is refreshed and the XMI file is imported.
Figure 7.43 - XMI file imported

Modifying UML2 XMI

After exporting, you may edit the XMI file in Eclipse.
Here, changing the name of a class is used as an example.
1. Expand the project tree and select the class which you want to change it's name.
Figure 7.44 - Select the class to modify

2. Select Show Properties View in the popup menu.
Figure 7.45 - Select Show Properties View

3. Select the property you want to edit. Here, select Name and click on the Value column.
Figure 7.46 - Select the property to edit
 
4. Change the Name and save the project.
Figure 7.47 - Change the property


Importing UML2 XMI

After modifying in Eclipse UML2, you can import back the file to update your project. The process of importing is the same as importing XMI file.
To import XMI:
1. Select File > Import > XMI... in the main menu.
Figure 7.48 - Import XMI

2. Import XMI dialog box is displayed. Specify the import file's path by typing in the text box or select ... and click OK to confirm.
Figure 7.49 - Specify import file's path

3. The project is updated. The diagram before importing.
Figure 7.50 - The diagram before importing

The diagram after importing. The name of class Polygon has been changed into Shape.
Figure 7.51 - The diagram after importing


Importing Rational Rose Project File

Rational Rose® is one of the most widely used UML CASE tool in 90's.
VP supports the importing of Rational Rose file. As a result, you can import your Rational Rose project into VP and retain all the information in the project, including color and position.

Figure 7.52 - Import from Rational Rose®

Importing a Rose Project

To import a Rose project into Agilian:
1. Select File > Import > Rose Project... from main menu. This displays the Import Rose Option dialog box.
 Figure 7.53 - Import a Rose Project

2.Type in the path of Rational Rose file in the File path. You may also select ... to select the file.
 Figure 7.54 - Specify the file path

3. Select the mode of importing from the drop down menu of Import mode. You can choose to import Model only or both Model and diagram. Then, click OK to start importing the MDL file.
 Figure 7.55 - Select the import mode

4. The progress dialog box appears. You can check the check box Close Dialog when finished progress to close the dialog box when finished importing. You can select button to open the message pane.
 Figure 7.56 - Progress dialog box

5. The message pane shows the messages to indicate the progress of the importing process. When the process has finished click on the Close button in the progress dialog box to close.
 Figure 7.57 - Message pane opened

6. The models/diagrams are imported. Expand the project tree from Diagram Navigator and choose to browse for a diagram. You can Double-click on a diagram in the project tree to open the imported diagrams.
 Figure 7.58 - Diagrams imported

If you have selected Model only in the Import Mode in step 3, only models are imported. You can see the imported models in the Model pane.
Figure 7.59 - Models Imported

Previous Next
Visual Paradigm International Limited
Website: www.visual-paradigm.com
E-mail: support@visual-paradigm.com