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 and import XML file through the command line interface.
Exporting XML
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.
- Start the command prompt.
- Execute the script by supplying the required parameters. For example:
ExportXML -project C:\Demo\Demo.vpp -out C:\Demo\OutputParameter 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
Importing XML
To import XML to a project through command line:
- Browse the scripts folder under the Visual Paradigm installation directory.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.
- Start the command prompt.
- Execute the script by supplying the required parameters. For example:
ImportXML -project C:\Demo\Demo.vpp -file C:\Demo\input\project.xmlParameter Description Example -project Project path C:\Demo\Demo.vpp -file The filepath of the XML file to import C:\Demo\input\sample.xml