Chapter 27. Export and Import

  1. Home
  2. Docs
  3. Chapter 27. Export and Import
  4. 5. Command-line Interface
  5. Exporting and importing XML with command

Exporting and importing XML with command

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:

  1. 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.
  2. Start the command prompt.
  3. Execute the script by supplying the required parameters. For example:
    ExportXML -project C:\Demo\Demo.vpp -out C:\Demo\Output

    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

Importing XML

To import XML to a project through command line:

  1. 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.
  2. Start the command prompt.
  3. Execute the script by supplying the required parameters. For example:
    ImportXML -project C:\Demo\Demo.vpp -file C:\Demo\input\project.xml

    Parameter Description Example
    -project Project path C:\Demo\Demo.vpp
    -file The filepath of the XML file to import C:\Demo\input\sample.xml