Altova UModel 2025 Professional Edition

UModel Command Line Interface

Home Prev Top Next

In addition to the graphical user interface, UModel also has a command line interface. To open the command line interface, run the UModelBatch.exe file available in the C:\Program Files\Altova\UModel2025 directory. If you run UModel 32-bit on a 64-bit operating system, the path is C:\Program Files (x86)\Altova\UModel2025.

 

The command line parameter syntax is shown below, and can be displayed in the command prompt window by entering: umodelbatch /?

 

Note:If the path or file name contains spaces, enclose it in quotes, for example: "C:\Program Files\...\MyProject.ump".

 

usage: UModelBatch.exe [project] [options]

 

/? or /help ... display this help information

 

project     ... project file (*.ump)

/new[=file] ... create/save/save as new project, see Creating, Loading, and Saving Projects in Batch Mode

/set        ... set options permanent

/gui        ... display UModel user interface

 

commands (executed in given order):

/chk        ... check project syntax

/isd=path   ... import source directory

/isp=file   ... import source project file

               (*.project,*.xml,*.jpx,*.csproj,*.csdproj,*.vcxproj,*.vbproj,*.vbdproj,*.sln,*.bdsproj)

/ibt=list   ... import binary types (specify binary[typenames] list)

               (';'=separator, '*'=all types, '#' before assembly names)

/ixd=path   ... import XML schema directory

/ixs=file   ... import XML schema file (*.xsd)

/m2c        ... update program code from model (export/forward engineer)

/c2m        ... update model from program code (import/reverse engineer)

/ixf=file   ... import XMI file

/exf=file   ... export to XMI file

/inc=file   ... include file

/mrg=file   ... merge file

/doc=file   ... write documentation to specified file

/lue[=cpri] ... list all elements not used on any diagram (i.e. unused)

/ldg        ... list all diagrams

/lcl        ... list all classes

/lsp        ... list all shared packages

/lip        ... list all included packages

 

options for save as new project:

/npad=opt   ... adjust relative file paths (Yes | No | MakeAbsolute)

 

options for import commands:

/iclg=lang  ... code language (Java1.4 | Java5.0 | Java6.0 | Java7.0 | Java8.0 | Java9.0 |

                              Java10.0 | Java11.0 | Java12.0 | Java13.0 | Java14.0 | Java15.0 |

                              C#1.2 | C#2.0 | C#3.0 | C#4.0 | C#5.0 | C#6.0 | C#7.0 | C#7.1 | C#7.2 | C#7.3 | C#8.0 | C#9.0 |

                              VB7.1 | VB8.0 | VB9.0 |

                              C++98 | C++11 | C++14 | C++17)

/ipsd[=0|1] ... process sub directories (recursive)

/irpf[=0|1] ... import relative to UModel project file

/ijdc[=0|1] ... JavaDocs as Java comments

/icdc[=0|1] ... DocComments as C# comments

/icds[=lst] ... C# defined symbols

/ivdc[=0|1] ... DocComments as VB comments

/ivds[=lst] ... VB defined symbols (custom constants)

/icppdm[=lst] ... C++ defined macros

/icpphi[=0|1] ... read only C++ header files

/icpphc[=0|1] ... treat .h files a .cpp files

/icppms[=0|1] ... enable C++ Microsoft Compiler compatibility

/icppmv[=ver] ... MSVC version to use (1900 | 1800 | 1700 | 1600 | 1500 | 1400 | 1310 | 1300 | 1200)

/icppsy[=0|1] ... auto detect C++ system include files

/icppid[=lst] ... list of C++ include directories to use

/icppsd[=lst] ... list of C++ system include directories to use

/icppag[=arg] ... Additional C++ arguments for the compiler

/imrg[=0|1] ... synchronize merged

/iudf[=0|1] ... use directory filter

/iflt[=lst] ... directory filter (presets /iudf)

 

options for import binary types (after /iclg):

/ibrt=vers  ... runtime version

/ibpv=path  ... override of PATH variable for searching native code libraries

/ibro[=0|1] ... use reflection context only

/ibua[=0|1] ... use add referenced types with package filter

/ibar[=flt] ... add referenced types package filter (presets /ibua)

/ibot[=0|1] ... import only types

/ibuv[=0|1] ... use minimum visibility filter

/ibmv[=key] ... keyword of required minimum visibility (presets /ibuv)

/ibsa[=0|1] ... suppress attribute sections / annotation modifiers

/iboa[=0|1] ... create only one attribute per attribute section

/ibss[=0|1] ... suppress 'Attribute' suffix on attribute type names

 

options for diagram generation:

/dgen[=0|1] ... generate diagrams

/dopn[=0|1] ... open generated diagrams

/dsac[=0|1] ... show attributes compartment

/dsoc[=0|1] ... show operations compartment

/dscc[=0|1] ... show nested classifiers compartment

/dstv[=0|1] ... show tagged values

/dudp[=0|1] ... use .NET property compartment

/dspd[=0|1] ... show .NET property compartment

 

options for export commands:

/ejdc[=0|1] ... Java comments as JavaDocs

/ecdc[=0|1] ... C# comments as DocComments

/evdc[=0|1] ... VB comments as DocComments

/espl[=0|1] ... use user defined SPL templates

/ecod[=0|1] ... comment out deleted

/emrg[=0|1] ... synchronize merged

/egfn[=0|1] ... generate missing file names

/eusc[=0|1] ... use syntax check

 

options for XMI export:

/exid[=0|1] ... export UUIDs

/exex[=0|1] ... export UModel specific extensions

/exdg[=0|1] ... export diagrams (presets /exex)

   /exuv[=ver] ... UML version (UML2.0 | UML2.1.2 | UML2.2 | UML2.3 | UML2.4 | UML2.5 | UML2.5.1)

 

options for merge file:

/mcan=file  ... common ancestor file

 

options for documentation generation:

/doof=fmt   ... output format (HTML | RTF | MSWORD | PDF)

/dsps=file  ... SPS design file

 

Example 1: Import Java source code and preserve settings

The following command imports source code and creates a new project file. Notice that the project path contains spaces and is enclosed in quotes.

 

"C:\Program Files\Altova\UModel2025\UModelBatch.exe" /new="C:\My Projects\Fred.ump" /isd="X:TestCases\UModel\Fred" /set /gui /iclg=Java8.0 /ipsd=1 /ijdc=1 /dgen=1 /dopn=1 /dmax=5 /chk

 

The meaning of all options is as follows:

 

/new

Specifies that the newly-created project file should be called "Fred.ump" in C:\My Projects

/isd

Specifies that the source directory should be X:\TestCases\UModel\Fred

/set

Specifies that any options used in the command line tool will be saved in the registry (When subsequently starting UModel, these settings become the default settings).

/gui

Display the UModel graphical user interface during batch processing.

/iclg

UModel will import the code as Java 8.0.

/ipsd=1

Recursively process all subdirectories of the root directory specified in the /isd parameter.

/ijdc=1

Create JavaDoc from comments where appropriate.

/dgen=1

Generate diagrams.

/dopn=1

Open generated diagrams.

/chk

Perform a syntax check.

 

Example 2: Synchronize code from the model

The following command updates code from an existing project file ("C:\UModel\Fred.ump").

 

"C:\Program Files\Altova\UModel2025\UModelBatch.exe" "C:\UModel\Fred.ump" /m2c /ejdc=1 /ecod=1 /emrg=1 /egfn=1 /eusc=1

 

The meaning of all options is the same as in the previous examples, plus:

 

/m2c

Update the code from the model.

/ejdc

Comments in the project model should be generated as JavaDoc.

/ecod=1

Comment out any deleted code.

/emrg=1

Synchronize the merged code.

/egfn=1

Generate any missing file names in the project.

/eusc=1

Use the syntax check.

 

Example 3: Import Java binaries into the model

Let's assume that some Java binary .class files exist in the C:\JavaProject\bin directory, and you want to import these binaries into UModel. To do this, run the following command:

 

"<C:\Program Files\Altova\UModel2025\UModelBatch.exe>" /new="C:\JavaProject\Result.ump" /ibt=*C:\JavaProject\bin /iclg=Java8.0 /ibrt=JDK1.8.0_144 /dgen=1 /chk

 

The options used are as follows:

 

/new

Creates a new UModel project at the specified path.

/ibt

Instructs UModel to import binary types. The asterisk before the path indicates that all binary types at that path must be imported.

/iclg

Specifies the code generation language ("Java8.0", in this example).

/ibrt

Specifies the runtime environment ("JDK1.8.0_144" in this example). This is the same value that appears on the "Import Binary Types" dialog box in the "Runtime" drop-down list, see Importing Java, C# and VB.NET Binaries. You can also use a value like "jdk-10.0.1" as set in the JAVA_HOME environment variable.

 

For C#, you can use the value /ibrt:any or otherwise values as they appear in the GUI in the "Runtime" drop-down list, making sure to omit any spaces. Examples:

 

/ibrt:any

/ibrt:.NET5

/ibrt:.NETFramework4.8(v4.8.3752)

 

The option "any" is the same as selecting "any (use disassembler)" from the "Runtime" drop-down list and is the recommended option.

/dgen=1

Generate diagrams.

/chk

Perform a syntax check after import.

© 2018-2024 Altova GmbH