UCAIug open source tool · latest release 2.0.1
Command line tool for generating CIM model comparison reports
CIM Model Management

cim-comparecim-compare

cim-compare is an open-source command line tool from the UCA International Users Group (UCAIug) that generates readable comparison reports between two versions of a CIM UML model.

See an example report, or download this guide as a PDF.

Table of Contents

Latest Release

2.0.1

What’s New in 2.0.1

What’s New in 2.0.0

Overview: CIM Model Comparison Reports

cim-compare generates model comparison reports between two points in time.

The term “destination” is used to describe some current version (or latest working copy) of a CIM model that is to be the target of the comparison. The term “baseline” is used to describe the historical model against which the “destination” model is to be compared to determine what has changed.

Enterprise Architect (Corporate Edition and above) has the capability to perform these model comparisons; however, the feature is not generally useful as results are only exportable as XML files that are not easily human readable.

The output generated by cim-compare is a single, self-contained HTML file covering all changes between a “baseline” and “destination” model. It needs no web server and no internet connection: open it from disk in any current browser (see Supported Browsers). By default the report shows only what changed; --full adds the unchanged items.

Reading a Comparison Report

Report Layout

Status Colors

Color Status Meaning
Green Added Only in the destination model.
Red Deleted Only in the baseline model.
Yellow Moved Same element (same GUID), now in a different package. The row says which package it came from.
Blue Changed Same element, same package; some of its properties, attributes or links differ.
Grey Identical Unchanged. Shown only with --full.

The status is also written on each row (ADDED, DELETED, MOVED, CHANGED), so the report can be read without relying on color. A renamed element shows its new name, with “renamed from old name” in grey beside it (in the tree) or under it (in tables).

Class Details

Open a class to see what changed in it, in this order:

  1. Description – the class notes. When they changed, the baseline text appears beside the destination text, and the destination is redlined: wording removed since the baseline is struck through in red and new wording is highlighted in green. When most of a text was rewritten, the whole old text is struck through and the whole new text inserted, which is easier to read than a word-by-word comparison.
  2. Metadata – the class properties that changed (stereotype, abstract, alias and so on), baseline beside destination.
  3. Attributes – one row per changed attribute: its type and multiplicity in the baseline and in the destination, and its notes, redlined. In the Destination column a changed type is shown as the new type in blue, and a changed multiplicity is redlined. A renamed attribute shows its new name with “renamed from old name” under it. A new attribute shows “does not exist” in the baseline column; a deleted one shows “removed from model” in the destination column.
  4. Links – generalizations, associations and aggregations, each as a card showing both ends in the baseline and in the destination, followed by the changed properties of the source end and the target end. Each end of an association reads class role role name [multiplicity], for example ACDCTerminal role ACDCTerminal [0..1]: the class (a link to it), then its role name and multiplicity. On the destination line changed role names and multiplicities are redlined.

Other controls in the header:

Redlining marks changed descriptions and notes, names (including role names) and multiplicities. A changed attribute type is the one exception: it is shown as the new type, in blue. A renamed element also shows “renamed from old name” next to its new name.

Descriptions and notes are shown exactly as stored in Enterprise Architect. Any rich-text formatting (for example <i>, <sub>, <li>) appears as raw markup; it is not rendered.

Added and deleted classes are shown compactly (their attributes and links as a simple list); Show full metadata for this new class (or removed class) opens the complete tables.

Diagrams

With --include-diagrams, each changed diagram shows its changed properties and, when something on the diagram changed, the baseline and destination images side by side. Click an image to enlarge it; press Esc to close.

Changes are outlined on the images, and a legend above them lists the kinds present:

A shift of the whole diagram, which Enterprise Architect often makes when exporting, is not counted as a move. Turn the outlines off with the Diagram highlights checkbox in the header.

Changed connectors (associations, generalizations and other lines) are listed in a Connectors table under the images: added, removed, rerouted, labels moved (role names or multiplicities dragged) or restyled, each named by the two elements it joins. Point at a row to outline those two elements with a dashed box on the image it applies to (the baseline for a removed connector); click the row to keep the outline. Connectors are listed rather than drawn because Enterprise Architect does not record the route it draws for them. “(not in this model)” stands for an element the diagram shows but the exported model does not define, such as a class from another model.

Every diagram that changed is listed. A diagram whose only changes are its name, notes or modified date, with nothing changed on it, shows its metadata alone, and its images are not kept: cim-compare deletes the images of diagrams the report does not show, as it does for identical diagrams, so they are not included by --zip.

Finding Things

Keyboard Shortcuts

Key Action
/ Search
↑ ↓ Previous / next row (in search results: previous / next match)
← → Close / open the current row
Enter Open or close the current row (in search: go to the match)
Home Back to the top (the browser’s Back button returns you)
o Show / hide the package outline
g Show / hide GUIDs
Esc Clear the search, close a pop-up or an enlarged diagram

Supported Browsers

Current versions of Chrome, Edge, Firefox and Safari. Internet Explorer is not supported. Printing expands the whole report and leaves out the header and the outline.

Setup & Configuration

Java Technical Requirements

cim-compare ships as a fully self-contained executable jar file with no external dependencies. To execute it requires that an appropriate release of Java be installed on your system.

Given the large file sizes consumed and produced by the utility, OutOfMemory exceptions occur if the default heap (memory) size is used. The following guidelines should be followed:

For a 32-bit JRE it is recommended to specify a max heap size of at least 1G (i.e. 1024m) resources permitting. With a 1G heap size the execution will typically run slower. Note that the maximum theoretical heap limit for a 32-bit JVM is 4G. However, due to various additional constraints such as available swap, kernel address space usage, memory fragmentation, and VM overhead, in practice the limit can be much lower. On most modern 32-bit Windows systems the maximum heap size will range from 1.4G to 1.6G.

java -Xmx1G -jar cim-compare-2.0.1.jar iec61970cim16v26a.xmi iec61970cim17v16.xmi D:\reports

For 64 bit JREs it is recommended that the maximum heap size be increased to at least 2G (i.e. 2048m) but more if available. It has been observed that 2G is minimally sufficient to handle larger CIM models one might encounter. In the below example 4G is being allocated.

java -Xmx4G -jar cim-compare-2.0.1.jar iec61970cim16v26a.qea iec61970cim17v16.qea D:\reports

Most of that memory is needed to export and compare the models. Producing the report itself takes much less: for a full-model CIM17v40 → CIM18v16 comparison (a 92 MB comparison XML), the report step needed less than 1G, including with --full.

For freely available downloads of Java visit Azul Systems’ download site at Download Azul JDKs.

Java 24 and Later

cim-compare 2.0.1 runs on Java 24 and later (including Java 25) with no extra settings. Two changes in Java 24 affect it (#65):

With cim-compare 2.0.0 or earlier on Java 24 or later, add the settings to the command line yourself, before -jar:

java -Xmx4G -Djdk.xml.totalEntitySizeLimit=0 -Djdk.xml.maxGeneralEntitySizeLimit=0 --enable-native-access=ALL-UNNAMED -jar cim-compare-2.0.0.jar ...

or, in a batch file, set them once for every Java program run from it:

set "JAVA_TOOL_OPTIONS=-Djdk.xml.totalEntitySizeLimit=0 -Djdk.xml.maxGeneralEntitySizeLimit=0 --enable-native-access=ALL-UNNAMED"

Note that newer Java releases for Windows are 64-bit only (see Azul OpenJDK). Comparing .eap project files needs 32-bit Java, so for .eap input use Java 21 or earlier; .qea, XMI and compare-log input can use any current release.

Azul OpenJDK

We recommend end-users use Azul OpenJDK (Zulu) which is Azul Systems’ free, TCK-certified binary distribution of the OpenJDK — the open-source implementation of the Java Platform, Standard Edition (Java SE). Azul provides reliable, production-ready Java runtimes for enterprises and developers who want an open-source alternative to Oracle JDK. OpenJDK is:

When downloading there are special considerations related to the 32-bit version. As of Azul’s April 2025 supported-platforms list, Java 8, 11, 17, 21 — are available in both Windows x86 32‑bit and 64‑bit, as well as Linux x86 32‑bit and 64‑bit. However, there are no 32-bit builds for the latest releases:

The reason for the shift is that it reflects a broader trend. OpenJDK deprecated Windows 32‑bit, targeting removal in JDK 23+, making it increasingly rare to see 32‑bit builds in newer OpenJDK distributions. Therefore, though cim-compare is not tied to Java 17 and can run on newer releases of OpenJDK (from 2.0.1 including Java 24 and later with no extra settings; see Java 24 and Later), the below provided download links simply point to Java 17 where both 32-bit and 64-bit versions are available. For .qea, XMI or compare-log input a newer 64-bit release such as Java 21 or 25 works equally well.

Download 32-bit Java 17

If you are looking to run comparisons of .eap files then you’ll need 32-bit Java. To directly download a 32-bit Java 17 click the image below:

image

Download 64-bit Java 17

If you are comparing .qea files with a 64-bit EA (EA 16 or later) then you’ll need 64-bit Java. To directly download a 64-bit Java 17 click the image below:

image

Important Setup Considerations

The cim-compare command-line option described in the Option #1: Enterprise Architect .EAP or .QEA Project Files as Input section requires EA’s COM automation API. Consequently, if you plan to use it you are required to have a licensed version of Sparx Enterprise Architect (EA) installed for the COM automation API to work. The EA API and the eaapi.jar file act as interfaces to the Enterprise Architect application. The following explains why:

The COM interface wrappers ship with each release of Sparx EA in the “Java API” folder of the installation directory, similar to:

%WINDOWS_PROGRAM_FILES%\Sparx Systems\EAxx\Java API (e.g. "C:\Program Files\Sparx Systems\EA16\Java API")

The purpose of each is:

cim-compare communicates to the appropriate COM Module DLL depending on the particular JVM (32-bit or 64-bit) being used on the command line. Which DLL to load is decided at run time: EA’s eaapi.jar loads SSJavaCOM.dll when Java reports its architecture as x86 (32-bit Java) and SSJavaCOM64.dll otherwise.

Another key requirement is that these DLL COM interface wrappers must be where Java can find them at run time. Java looks in the folders listed in java.library.path, which on Windows defaults to the folders on the PATH (Sparx’s own instructions copy SSJavaCOM.dll into a Windows system folder). For cim-compare we recommend naming the folder explicitly with the -Djava.library.path JVM parameter, as in the examples below; on a machine with more than one EA installation it is the way to choose which installation’s DLLs are used.

To use cim-compare on a system with a dual 32-bit and 64-bit Sparx EA installation (e.g. EA 15.x and EA 16.x) you will need to have a configuration similar to the following:

C:\
├── cim-compare
│   ├── cim-compare-2.0.1.jar   (the latest downloaded from https://cim-compare.ucaiug.io)
│   ├── cim-compare-2.0.1.bat   (example batch file for execution)
│   ├── ea15
│   │   ├── SSJavaCOM.dll       (copied from "C:\Program Files (x86)\Sparx Systems\EA15\Java API")
│   │   └── SSJavaCOM64.dll     (copied from "C:\Program Files (x86)\Sparx Systems\EA15\Java API")
│   ├── ea16
│   │   ├── SSJavaCOM.dll       (copied from "C:\Program Files\Sparx Systems\EA16\Java API")
│   │   └── SSJavaCOM64.dll     (copied from "C:\Program Files\Sparx Systems\EA16\Java API")
│   ├── cim17v40.eap
│   ├── cim18v02.eap
│   ├── cim18v12.qea
│   └── cim18v13.qea
├── Program Files (x86)         (32-bit JVM installation, required for .eap files)
│   └── Zulu
│       └── zulu-17
│           └── bin
│               └── java.exe
├── Program Files               (64-bit JVM installation, for .qea files with the 64-bit EA16)
│   └── Zulu
│       └── zulu-17
│           └── bin
│               └── java.exe
└── ...

Of importance is that each EA installation’s set of DLL files be located in their own directory. This will allow for the ability to isolate where Java looks for its COM Modules based on the specific release of Sparx EA.

Following is a set of command lines based on the above example configuration and file system structure. The first compares .eap files with 32-bit Java and the 32-bit EA15 installation; the second compares .qea files with 64-bit Java and the 64-bit EA16 installation. The command lines are split over several lines with ^, the Windows command prompt’s line-continuation character, so they can be pasted into a command prompt as shown.

"C:\Program Files (x86)\Zulu\zulu-17\bin\java.exe" -Xmx1G -Djava.library.path="C:\cim-compare\ea15" ^
  -jar cim-compare-2.0.1.jar cim17v40.eap cim18v02.eap comparison-report.html ^
  --include-diagrams --image-type=JPG

The above 32-bit command line example uses:

"C:\Program Files\Zulu\zulu-17\bin\java.exe" -Xmx4G -Djava.library.path="C:\cim-compare\ea16" ^
  -jar cim-compare-2.0.1.jar cim17v40.qea cim18v02.qea comparison-report.html ^
  --include-diagrams --image-type=JPG

The above 64-bit command line example uses:

Warning: Potential Configuration Pitfalls

A common “gotcha” that users run into is that when using .eap project files as input into cim-compare, they unknowingly use 64-bit Java instead of 32-bit Java (and vice versa). When comparing two .eap files, 32-bit Java (and a 32-bit EA) must be used, because only 32-bit EA can open .eap files. .qea files can be opened by 32-bit and 64-bit EA alike, so for them use Java of the same bit-width as the EA installation that will open them: 64-bit Java with a 64-bit EA (EA 16 or later), which is the tested combination.

Noteworthy in the previous command line examples is that java has been expressly qualified as either "C:\Program Files (x86)\Zulu\zulu-17\bin\java.exe" or "C:\Program Files\Zulu\zulu-17\bin\java.exe" to ensure that the correct version of Java is used. This is not a requirement but rather one method to eliminate this as a pitfall.

If choosing to simplify the command line via use of the default installation of Java such as:

java -Xmx4G -Djava.library.path="C:\cim-compare\ea16" -jar cim-compare-2.0.1.jar ...

…then it is suggested that you confirm the bit-wise version of your default Java installation. The following java command will result in output that should indicate if your default installation is 32-bit. This either by explicitly stating as such or by including the installation directory which for 32-bit will be located in C:\Program Files (x86)\.... Note that for many of the newest releases of Java, if not explicitly stated as being 32-bit, it is then implied to be 64-bit as illustrated in this example:

C:\>java -version
openjdk version "17.0.13" 2024-10-15 LTS
OpenJDK Runtime Environment Zulu17.54+21-CA (build 17.0.13+11-LTS)
OpenJDK Client VM Zulu17.54+21-CA (build 17.0.13+11-LTS, mixed mode, emulated-client)

If command line execution results in an error similar to the following then it typically is an indicator that the Java executable being used does not bit-wise match the project files being input:

java.lang.Exception: Internal application error.
       at org.sparx.Repository.comGetModels(Native Method)
       at org.sparx.Repository.GetModels(Repository.java:805)
       at org.cimug.compare.app.CIMModelComparisonGenerator.parseFileArguments(CIMModelComparisonGenerator.java:492)
       at org.cimug.compare.app.CIMModelComparisonGenerator.main(CIMModelComparisonGenerator.java:107)
ERROR:  Terminating XMI export processing for EA project file [CIMMarket04v16a.eap] due to an unexpected exception.

Finally, keep in mind that when using the default installation you could have a bit-wise compliant version of Java and have no issues creating reports only later to discover that cim-compare no longer work. Such a scenario can occur when between uses of cim-compare, software is installed on your system that, as part of its installation process, installs a newer 64-bit version of Java. This would then make this latest installation of Java your default. This typically happens “under the radar” and should be one of the first things checked when troubleshooting potential issues.

Command Line Usage

The cim-compare utility has three possible command-line options to produce comparison reports as described next. In the examples, long command lines are split with ^, the Windows command prompt’s line-continuation character, so they can be pasted into a command prompt as they are. Directory and file paths that contain spaces are given in quotes.

Option #1: Enterprise Architect .EAP or .QEA Project Files as Input

The preferred usage is to provide two Enterprise Architect *.eap or *.qea files for the “baseline” and “destination” input files. Using these file types eliminates the need to manually export XMI and diagrams from EA as described later in the Enterprise Architect XMI Export Procedures section. When using these file types as inputs on the command line both “baseline” and “destination” files must be either 32-bit (i.e. *.eap) or 64-bit (i.e. *.qea) files. Note that the processing of 64-bit *.qea files is more performant.

The command-line usage for this option takes the following form:

java [<jvm-parameter-1>]...[<jvm-parameter-n>] -jar cim-compare-2.0.1.jar
     <baseline-model-file> <destination-model-file> [<output-directory-or-html-file>]
     [--package=<package-name>] [--full] [--include-diagrams] [--image-type=<image-file-extension>]
     [--zip] [--cleanup]

Parameter Details:

[<jvm-parameter-x>] (Optional): A JVM (Java Virtual Machine) parameter that may be needed for execution. JVM parameters are configurations used to control the behavior of the JVM at runtime and take a form such as -Xmx1G, -Xmx4G or -Dfile.encoding=UTF-8. These parameters can influence memory usage, garbage collection, system properties, debugging, and performance tuning. JVM parameters are passed as command-line arguments when starting a Java application and if used should appear first in the sequence of command line arguments (before cim-compare-2.0.1.jar). This is necessary so that cim-compare does not try to process them as part of its command line arguments which should always appear after cim-compare-2.0.1.jar. Note that for this Option #1 the -Djava.library.path=<directory> JVM parameter is required as will be described later.

<baseline-model-file> (Required): An Enterprise Architect baseline .eap or .qea model file. When not specified as an absolute file path the location is assumed to be the directory cim-compare is being executed from.

<destination-model-file> (Required): An Enterprise Architect destination .eap or .qea model file. When not specified as an absolute file path the location is assumed to be the directory cim-compare is being executed from.

[<output-directory-or-html-file>] (Optional): An output directory or an output HTML file. In the case where a directory is specified but does not exist it will be created. The same is true for the parent directory of a specified HTML file if it does not exist. When an HTML file is provided it may be specified as an absolute file path or as the simple name of an HTML file to be generated. If this command line option is not specified then cim-compare will generate an HTML file whose name is derived from the two input files.

[--package=<package-name>] (Optional): The package to compare, together with everything below it (e.g. --package=Grid, --package=IEC61970, --package=IEC61968, --package=IEC62325). The package is looked up by name in both models, root nodes included. If it was renamed between the two versions, either name can be given: for example, comparing CIM17 (where the package is IEC61970) with CIM18 (where it is Grid), cim-compare finds the package by name in one model and by its GUID in the other. If the package can’t be found in both models, cim-compare stops with an error. When --package is not given, the whole model is compared.

[--full] (Optional): Include identical packages, classes, attributes, links and diagrams in the report as well as the changes. They are shown collapsed and in grey. Without --full the report contains only what changed.

[--minimal] (Optional): Accepted so that command lines written for 1.x keep working, but has no effect: the report contains only changes by default since 2.0.0.

[--include-diagrams] (Optional): Indicates that diagram images should also be exported from EA along with the XMI exports. The type of images to be exported should also be provided using the --image-type option. When not specified the image type will default to JPG.

[--image-type=<image-file-extension>] (Optional): The type of diagrams to be exported from EA (i.e. JPG, GIF, PNG, BMP, or EMF). This can be skipped for JPG images as JPG is used as the default value when the option is not specified. This command line option is only used when --include-diagrams also appears on the command line.

[--zip] (Optional): When specified cim-compare will package up the generated report and any associated diagrams into a single ZIP archive. It is most often utilized for packaging the report when diagram images are included and can help simplify distribution. The ZIP archive contains the report and, with --include-diagrams, the Images-baseline and Images-destination folders; it never contains the XMI or XML files.

[--cleanup] (Optional): Used with --zip. Deletes the files and folders created during report generation, leaving the ZIP archive: here the report, the exported XMI files, the comparison XML, the enriched XML and the image folders. Your two EA project files are not touched.

Command Line Examples:

java -Xmx1G -Djava.library.path="C:\cim-compare\ea15" -jar cim-compare-2.0.1.jar ^
  "C:\exports\15v33.eap" "C:\exports\CIM16v26a.eap" "C:\reports"

java -Xmx4G -Djava.library.path="C:\cim-compare\ea16" -jar cim-compare-2.0.1.jar ^
  "C:\exports\15v33.qea" "C:\exports\CIM16v26a.qea" "C:\reports"

java -Xmx1G -Djava.library.path="C:\cim-compare\ea15" -jar cim-compare-2.0.1.jar ^
  "C:\exports\15v33.eap" "C:\exports\CIM16v26a.eap" --package=IEC61970

java -Xmx1G -Djava.library.path="C:\cim-compare\ea15" -jar cim-compare-2.0.1.jar ^
  CIM15v33.eap CIM16v26a.eap C:\reports --include-diagrams --zip

java -Xmx4G -Djava.library.path="C:\cim-compare\ea16" -jar cim-compare-2.0.1.jar ^
  CIM15v33.qea CIM16v26a.qea C:\reports\CIM15v33_CIM16v26a_ComparisonReport.html --full

java -Xmx1G -Djava.library.path="C:\cim-compare\ea15" -jar cim-compare-2.0.1.jar ^
  CIM15v33.eap CIM16v26a.eap --package=IEC62325 --include-diagrams --image-type=GIF --zip --cleanup

java -Xmx4G -Djava.library.path="C:\cim-compare\ea16" -jar cim-compare-2.0.1.jar ^
  CIM17v40.qea CIM18v16.qea --package=Grid --include-diagrams --zip --cleanup

NOTE: The above command line examples illustrate the use of both .eap and .qea EA files as input. Where .eap files appear as input on the command line it is assumed that 32-bit Java is being used to execute the .jar file. Likewise, for .qea files it is assumed that 64-bit Java and a 64-bit EA are used.

Option #2: XMI Baseline and Destination Models as Input

The second usage is to directly specify two XMI 1.1 compliant files representing the “baseline” and “destination” models exported as described later in Enterprise Architect XMI Export Procedures. In this scenario the command-line usage takes the following form:

java [<jvm-parameter-1>]...[<jvm-parameter-n>] -jar cim-compare-2.0.1.jar
     <baseline-model-xmi-file> <destination-model-xmi-file> [<output-directory-or-html-file>]
     [--package=<package-name>] [--full] [--include-diagrams] [--image-type=<image-file-extension>]
     [--zip] [--cleanup]

Parameter Details:

[<jvm-parameter-x>] (Optional): A JVM (Java Virtual Machine) parameter that may be needed for execution. JVM parameters are configurations used to control the behavior of the JVM at runtime and take a form such as -Xmx1G, -Xmx4G or -Dfile.encoding=UTF-8. These parameters can influence memory usage, garbage collection, system properties, debugging, and performance tuning. JVM parameters are passed as command-line arguments when starting a Java application and if used should appear first in the sequence of command line arguments (before cim-compare-2.0.1.jar). This is necessary so that cim-compare does not try to process them as part of its command line arguments which should always appear after cim-compare-2.0.1.jar.

<baseline-model-xmi-file> (Required): An XMI 1.1 compliant baseline model file exported from EA. When not specified as an absolute file path the location of the file is assumed to be the directory the utility is being executed from.

<destination-model-xmi-file> (Required): An XMI 1.1 compliant destination model file exported from EA. When not specified as an absolute file path the location of the file is assumed to be the directory the utility is being executed from.

[<output-directory-or-html-file>] (Optional): An output directory or an output HTML file. In the case where a directory is specified but does not exist it will be created. The same is true for the parent directory of a specified HTML file if it does not exist. When an HTML file is provided it may be specified as an absolute file path or as the simple name of an HTML file to be generated. If this command line option is not specified then cim-compare will generate an HTML file whose name is derived from the two input files.

[--package=<package-name>] (Optional): The package the report starts from, together with everything below it (e.g. --package=Grid, --package=IEC61970, --package=IEC61968, --package=IEC62325). The name can be the package’s name in either model, so a package renamed between the two versions (e.g. IEC61970 → Grid) can be given by either name. If no package of that name is in the comparison, cim-compare stops with an error. When --package is not given, the report covers the whole model.

[--full] (Optional): Include identical packages, classes, attributes, links and diagrams in the report as well as the changes. They are shown collapsed and in grey. Without --full the report contains only what changed.

[--minimal] (Optional): Accepted so that command lines written for 1.x keep working, but has no effect: the report contains only changes by default since 2.0.0.

[--include-diagrams] (Optional): When specified cim-compare indicates that diagram images should be included in the generated comparison report. Note that if the types of diagrams to be included are not JPG files then the --image-type option must also be used in tandem. When this option does not appear on the command line no diagrams will be included in the report.

IMPORTANT: this command line option does not automatically export diagrams as performed in usage Option #1. Rather the expectation is that they be exported as part of manual exports of XMI baseline and destination models from EA and that images are hosted in folders named <output directory>\Images-baseline and <output directory>\Images-destination respectively. This must be done prior to running cim-compare. Images of diagrams the report does not show (identical diagrams, and diagrams with nothing changed on them) are deleted from those folders. Refer to the Enterprise Architect XMI Export Procedures for further details.

[--image-type=<image-file-extension>] (Optional / Conditionally Required): Indicates the type of images (i.e. JPG, GIF, PNG, BMP, or EMF) referenced in the report. Conditionally required when the --include-diagrams option is used and the diagram are not JPG image files. When not specified the default image type of JPG is used. This command line option is only relevant when --include-diagrams also appears on the command line.

[--zip] (Optional): When specified cim-compare will package up the generated report and any associated diagrams into a single ZIP archive. It is most often utilized for packaging the report when diagram images are included and can help simplify distribution. The ZIP archive contains the report and, with --include-diagrams, the Images-baseline and Images-destination folders (everything in them is included, so keep only the diagram images there); it never contains the XMI or XML files.

[--cleanup] (Optional): Used with --zip. Deletes the files created during report generation, leaving the ZIP archive: here the report, the comparison XML and the enriched XML. Your XMI files and your Images-baseline and Images-destination folders are not deleted.

Command Line Examples:

java -Xmx2G -jar cim-compare-2.0.1.jar "C:\XMI exports\15v33.xmi" "C:\XMI exports\CIM16v26a.xmi" "C:\reports"

java -Xmx2G -jar cim-compare-2.0.1.jar "C:\XMI exports\15v33.xmi" "C:\XMI exports\CIM16v26a.xmi" --package=IEC61970

java -Xmx2G -jar cim-compare-2.0.1.jar CIM15v33.xmi CIM16v26a.xmi C:\reports --full

java -Xmx2G -jar cim-compare-2.0.1.jar CIM15v33.xmi CIM16v26a.xmi C:\reports ^
  --include-diagrams --image-type=GIF --zip --cleanup

java -Xmx2G -jar cim-compare-2.0.1.jar CIM15v33.xmi CIM16v26a.xmi C:\reports\CIM15v33_CIM16v26a_ComparisonReport.html

java -Xmx2G -jar cim-compare-2.0.1.jar CIM15v33.xmi CIM16v26a.xmi CIM15v33_CIM16v26a_ComparisonReport.html ^
  --package=IEC62325 --include-diagrams --image-type=JPG --zip

Option #3: EA Model Comparison Logs as Input

The third option is by specifying an EA model comparison log file as input on the command line. In order to perform this option it is first required that a comparison XML log file be generated from within Enterprise Architect. Refer to the EA Comparison Log Procedures for detailed information on generating XML Compare Logs from within Enterprise Architect. It is important to note that EA does not support comparisons of UML diagrams and therefore diagrams are not supported as part of reports generated using Option #3.

This particular usage takes the following form:

java [<jvm-parameter-1>]...[<jvm-parameter-n>] -jar cim-compare-2.0.1.jar
     <comparison-results-xml-file> [<output-directory-or-html-file>]
     [--package=<package-name>] [--full] [--zip] [--cleanup]

Parameter Details:

[<jvm-parameter-x>] (Optional): A JVM (Java Virtual Machine) parameter that may be needed for execution. JVM parameters are configurations used to control the behavior of the JVM at runtime and take a form such as -Xmx1G, -Xmx4G or -Dfile.encoding=UTF-8. These parameters can influence memory usage, garbage collection, system properties, debugging, and performance tuning. JVM parameters are passed as command-line arguments when starting a Java application and if used should appear first in the sequence of command line arguments (before cim-compare-2.0.1.jar). This is necessary so that cim-compare does not try to process them as part of its command line arguments which should always appear after cim-compare-2.0.1.jar.

<comparison-results-xml-file> (Required): The model comparison file. When not specified as an absolute file path the location of the file is assumed to be the directory the utility is being executed in.

[<output-directory-or-html-file>] (Optional): An output directory or an output HTML file. In the case where a directory is specified but does not exist it will be created. The same is true for the parent directory of a specified HTML file if it does not exist. When an HTML file is provided it may be specified as an absolute file path or as the simple name of an HTML file to be generated. If this command line option is not specified then cim-compare will generate an HTML file whose name is derived from the comparison file’s name.

[--package=<package-name>] (Optional): The package the report starts from, together with everything below it (e.g. --package=Grid, --package=IEC61970, --package=IEC61968, --package=IEC62325). The name can be the package’s name in either model, so a package renamed between the two versions (e.g. IEC61970 → Grid) can be given by either name. If no package of that name is in the comparison, cim-compare stops with an error. When --package is not given, the report covers the whole model.

[--full] (Optional): Include identical packages, classes, attributes, links and diagrams in the report as well as the changes. They are shown collapsed and in grey. Without --full the report contains only what changed.

[--minimal] (Optional): Accepted so that command lines written for 1.x keep working, but has no effect: the report contains only changes by default since 2.0.0.

[--zip] (Optional): When specified cim-compare will package up the generated report into a single ZIP archive. Note that since this option #3 does not support diagram comparisons only the report itself will be included in the archive.

[--cleanup] (Optional): Used with --zip. Deletes the report and the enriched XML, leaving the ZIP archive. Your comparison XML file is not deleted.

Command Line Examples:

java -Xmx2G -jar cim-compare-2.0.1.jar "C:\CIM XMI Exports\CIM15v33_CIM16v26a_EA_Comparison_Report.xml" "C:\Reports"

java -Xmx2G -jar cim-compare-2.0.1.jar CIM15v33_CIM16v26a_EA_Comparison_Report.xml "C:\Comparison Reports" --full

java -Xmx2G -jar cim-compare-2.0.1.jar CIM15v33_CIM16v26a_EA_Comparison_Report.xml "C:\Comparison Reports" --package=IEC61968

java -Xmx2G -jar cim-compare-2.0.1.jar CIM15v33_CIM16v26a_EA_Comparison_Report.xml ComparisonReport_CIM15v33_CIM16v26a.html

java -Xmx2G -jar cim-compare-2.0.1.jar CIM15v33_CIM16v26a_EA_Comparison_Report.xml

java -Xmx2G -jar cim-compare-2.0.1.jar CIM15v33_CIM16v26a_EA_Comparison_Report.xml --package=IEC61970

java -Xmx2G -jar cim-compare-2.0.1.jar CIM15v33_CIM16v26a_EA_Comparison_Report.xml --package=IEC61970 --zip --cleanup

Output Files

In the output directory, a run produces:

File Produced by Contents
<name>.html all options The comparison report.
Images-baseline\, Images-destination\ Option #1 with --include-diagrams The diagram images exported from the two EA projects. (With Option #2 you provide these folders yourself.)
<baseline>.xmi, <destination>.xmi Option #1 The two models exported from EA as XMI 1.1.
<name>.xml Options #1 and #2 The comparison of the two models, in EA’s compare log format.
<name>-enriched.xml all options The comparison XML as prepared for the report: element kinds and statuses resolved, redlines computed, counts added. Useful for troubleshooting a report or for processing the comparison with other tools.
<name>.zip --zip The report and, with --include-diagrams, the two image folders.

With --zip --cleanup only the ZIP archive is left of what the run created; files you supplied are never deleted.

Enterprise Architect XMI Export Procedures

The procedure to perform an export of EA baseline and destination models as XMI 1.1 compliant files is as follows (screenshots taken from EA v15.1):

License

Distributed under the MIT license. See LICENSE for more information.

Third-Party Software

The cim-compare-2.0.1.jar includes the following third-party software: