Instant Generator

To generate code 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. Copy the script file InstantGenerator and paste to the bin folder of Visual Paradigm installation directory.
  3. Start the command prompt.
  4. Navigate to the bin folder of Visual Paradigm installation directory.
  5. 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:
    • Java
    • C#
    • VB.NET
    • PHP
    • ODL
    • ActionScript
    • IDL
    • C++
    • Delphi
    • Perl
    • XSD
    • Python
    • Objective-C
    • Ada95
    • Ruby
    C++
    -package
    [optional]
    The package(s) to be included in code generation. Usage:
    -package {fully-qualified-package-list}
     
    You may use ";" as separator, and note that all the sub-packages will be included.
    com.mypackage.model;com.mypackage.view
    -class
    [optional]
    The class(es) to be included in code generation. Usage:
    -class {fully-qualified-class-list}
     
    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.

Related Resources

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
 

Technical Support

Have technical issues or suggestions? Please contact Visual Paradigm Support Team.

Sales Support

Have questions related to registration, licensing or payment? Feel free to contact Visual Paradigm Sales Team.

Discussion Forum

Share your suggestions of opinions at VP Discussion Forum.