Interoperability is the ability to exchange information between two systems and to use the information that has been exchanged. Visual Paradigmsupports interoperability with XML file. You can export project data to an XML, manipulate it externally, and feed the changes back to Visual Paradigm. In this chapter, you will see how to export XML file of whole project or specific diagram in project.
Exporting whole project to XML
- Select Project > Export > XML… from the toolbar.
- Specify the output destination.
- Check Export project to export everything in the project to XML or keep it unchecked and check the diagram(s) to export only their content.
- Click Export. Upon finishing, you can visit the output destination specified to obtain the XML.
Exporting active diagram to XML
- Right click on diagram and select Export > Export XML… from the popup menu.
- In the Export to XML window, specify the output destination which is a folder for containing the exported XML files and optionally the image files of diagrams.
- Click Export.
Overview of exporting XML
No. | Name | Description |
---|---|---|
1 | Output destination | The location where you want to save the file. |
2 | XML structure | Controls how model data is to be presented in the exported XML file.
Traditional: XML elements are named in more general manner. For example, Model, StringProperty, etc. Simple: XML elements are named using the name of the model. For example, UseCase, Frame, etc. |
3 | Export project | By checking Export project, all models in the project will be exported. |
4 | Export sub-diagrams when export parent | By selecting Export sub-diagrams when export parent, the sub-diagram(s) will also be exported when the parent diagram(s) is exported.
For example, package MyWorks contains diagrams A and B. If you select to export diagram A, its parent “MyWork” will get exported, too. With the option Export sub-diagrams when export parent on, B will get exported too since B is a sub-diagram of package MyWorks. By turning off the option, B will be ignored when export. |
5 | Diagram list | A list of diagram of your project. Select the diagrams to export to XML. |
6 | Model elements | A list of model elements of your project. Select the model elements to export to XML. |
7 | Preview window | By checking the selected diagram and Show preview, it will be shown in preview window. |
8 | Preview mode | You can choose either Stretch or Real size to preview your diagram.
Stretch: The ratio of your diagram will be fit in the size of preview window. Real size: The ratio of your diagram will be shown on the preview window as its real size. |
9 | Export diagrams as images | When checked, image file of the selected diagrams will also be exported along with the exported XML. |
10 | Export | Click Export to proceed with exporting to XML. |
11 | Cancel | Click Cancel to discard exporting to XML. |
Exporting diagrams to XML with command line interface
To export XML and images from a project through command line:
- Browse the scripts folder under the Visual Paradigm installation directory. For Mac users, you can find the scripts folder in the Visual Paradigm package by right clicking on it and then selecting Show Package Contents. Then look in Contents\Resources\app\scripts for the scripts folder.
- Copy the script file ExportXML and paste to the bin folder of Visual Paradigm installation directory.
- Start the command prompt.
- Navigate to the bin folder of Visual Paradigm installation directory.
- Execute the script by supplying the required parameters. For example:
ExportXML -project C:\Demo\Demo.vpp -out C:\Demo\OutputBelow is a description of parameters:Parameter Description Example -project Project path C:\Demo\Demo.vpp -out Folder for storing the exported XML and images C:\Demo\Output -diagram One or more diagrams to be exported “Diagram A” “Diagram B” -noimage Do not export image files for diagrams N/A -refmodel Whether to embed referenced projects’ content inline true