Chapter 27. Export and Import

  1. Home
  2. Docs
  3. Chapter 27. Export and Import
  4. 5. Command-line Interface
  5. Using Instant Generator with command

Using Instant Generator with command

Download PDF

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

    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

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.