To generate code 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 InstantGenerator 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:
InstantGenerator -project C:\Demo\Demo.vpp -out C:\Demo\Output
Below is a description of parameters:
Parameter Description Example -project Project path C:\Demo\Demo.vpp -out The folder path of generated source files C:\Demo\Output -template [optional] The path of template folder. Unless specified, the default folder will be selected. C:\MyTemplates -lang [optional] Specify the language to generate. Unless specified, the lastly selected language (saved in project file) will be generated. Here are the possible options:
The package(s) to be included in code generation. Usage:
You may use ";" as separator, and note that all the sub-packages will be included.
The class(es) to be included in code generation. Usage:
You may use ";" as separator.
com.mypackage.model.Account;com.mypackage.view.AccountUI Parameters for InstantGenerator NOTE: Code generation through command line generates only classes selected when running Visual Paradigm. In other words, you must at least generate once in Visual Paradigm in order to make command line generation work.
The following resources may help you to learn more about the topic discussed in this page.
|5. Generating ORM code and/or database||Table of Contents||7. Instant reverse|