Visual Paradigm supports batch processing of tasks by executing commands. With this feature, you can conduct multiple tasks at one time or conduct tasks such as generating report, images and source code repeatedly throughout the day without user intervention.
| Batch Processing |
|
| To execute a command: |
|
| 1. |
Browse the scripts folder under the VP Suite installation directory. You'll find the script files for running various kind of command line operations. For Windows, the script files are batch files. For Linux and Mas OS X, they are shell scripts. |
|
 |
|
| 2. |
Copy the script that you want to run to the bin folder under the VP Suite installation directory. |
|
 |
|
| 3. |
Edit the script. If you are not using VP-UML, the first thing you need to do is to change the VPPRODUCT variable to your installed product. For example, to SDE-EC. |
|
 |
|
| 4. |
Start the command prompt and navigate to the bin folder of VP Suite installation directory. |
|
 |
|
| 5. |
If you are not familiar with the usage of the script file you want to run, type the name of the script file and press the Enter key. This prints the Usage on the screen. Usually, a script accepts the project file path and the output path to store the result produced by running the script. |
|
 |
|
| 6. |
Type in name of the script file, supply the arguments, and press the Enter key to run the script. |
|
 |
|
| 7. |
Upon finishing, you can find the generated file in the output path specified. For scripts that imports XML or XMI, the change will be made directly to the project. Thus, you can see the changes by opening the project if the execution is success. |
|
 |
|
| Batch Processing with Apache Ant |
| Apache Ant is a software tool for automating software build processes. It is written in the Java language and is primarily intended for use with Java. If you are not familiar with Ant, you can find more information about it at Ant's webpage. To execute commands with Ant: |
|
| 1. |
Browse the scripts folder under the VP Suite installation directory. Copy build.xml to the bin folder under the VP Suite installation directory. |
|
 |
|
| 2. |
Open the build file in any text editor. |
|
 |
|
| 3. |
Modify the property vpsuiteInstallationPath, vpproduct, vpworkspace and headless to suit your environment. |
|
 |
|
| 4. |
Scroll down a little bit and modify the arguments of the tasks that you want to execute. |
|
 |
|
| 5. |
Save and exit. |
|
| 6. |
Start the command prompt and navigate to the bin folder of VP Suite installation directory. |
|
 |
|
| 7. |
Enter 'ant', and then the task name to execute specific task. |
|
 |
|
| 8. |
Upon finishing, you can find the generated file in the output path specified. |
|
| List of Available Commands |
|
| Script file name |
Usage |
|
ExportDiagramImage.bat
|
ExportDiagramImage -project PROJECT -out OUTPUT_PATH -diagram DIAGRAM_LIST [-type TYPE]
Diagram list: DIAGRAM_NAME DIAGRAM_NAME2
or
@diagramlist.txt
Type: png, png_with_background, jpg, svg, pdf
Example:
ExportDiagramImage -project C:\Demo\Demo.vpp -out C:\Demo\Output -diagram * -type jpg
|
|
ExportXMI.bat
|
ExportXMI -project PROJECT -out XMI_FILE [-type TYPE] [-encoding ENCODING]
Type: 1.0, 1.2, 2.1, 2.1UML2
Example:
ExportXMI -project C:\Demo\Demo.vpp -out C:\Demo\Output\sample.xmi -type 2.1
|
|
ExportXML.bat
|
ExportXML -project PROJECT -out OUTPUT_DIRECTORY
Example:
ExportXML -project C:\Demo\Demo.vpp -out C:\Demo\Output\
|
|
GenerateORM.bat
|
GenerateORM -project PROJECT -out OUTPUT_DIRECTORY [-code] [-ddl] [-exportdb]
Example:
GenerateORM -project C:\Demo\Demo.vpp -out C:\Demo\Output
|
|
GenerateReport.bat
|
GenerateReport -project PROJECT -out OUTPUT_PATH -type TYPE [-all]]
Example:
GenerateReport -project C:\Demo\Demo.vpp -out C:\Demo\Output\MyReport.pdf -type html -all
|
|
ImportXMI.bat
|
ImportXMI -project PROJECT -file XMI_FILE
Example:
ImportXMI -project C:\Demo\Demo.vpp -file C:\Demo\input\sample.xmi
|
|
ImportXML.bat
|
ImportXML -project PROJECT -file XMI_FILE
Example:
ImportXML -project C:\Demo\Demo.vpp -file C:\Demo\input\sample.xml
|
|
InstantGenerator.bat
|
InstantGenerator -project PROJECT -out OUTPUT_DIRECTORY [-template TEMPLATE_DIRECTORY] [-lang LANGUAGE]
Languages: Java, C#, VB.NET, PHP, ODL, ActionScript, IDL, C++, Delphi, Perl, XSD, Python, Objective-C, Ada95, Ruby
Example:
InstantGenerator -project C:\Demo\Demo.vpp -out C:\Demo\Output
|
|
JavaCodeSync.bat
|
JavaCodeSync -project PROJECT -src SOURCE_DIRECTORY [-generate | -reverse]
Example:
JavaCodeSync -project C:\Demo\Demo.vpp -src C:\Demo\src -generate
|
|
ProjectPublisher.bat
|
ProjectPublisher -project PROJECT -out OUTPUT_PATH
Example:
ProjectPublisher -project PROJECT -out OUTPUT_PATH
|
|