What is visual diff?

The situation of comparing two diagrams is common. For example, comparing an ERD of conceptual model with an ERD of physical model and comparing a domain class diagram with a class diagram ready for implementation. VP-UML allows you to compare the differences between diagrams in order to trace the changes between them.

Diagram comparison

With the feature of Visual Diff, two diagrams can be compared to recognize their differences. Changes, such as modification of properties (e.g. name) and addition/removal of containing models, thereby can be found easily.

The overview of Visual Diff dialog box
The overview of Visual Diff dialog box

Various comparison strategies

A comparison strategy determines how two diagrams will be compared. Each strategy is used for its own specific purpose. You can select the appropriate strategy that suits your case most. The following is the description of strategies:

Strategy Description
ID Shapes will be matched base on their internal ID. Differences between shapes that have same ID will be displayed in the result pane. This strategy is usually used to visualize the changes of same shapes in two projects.
Name Shapes will be matched base on their names. This strategy is useful when visualizing differences for external works. One of typical examples is to compare databases and class models.
Transitor Shapes will be matched base on their transition established by Model Transitor. This way of comparison is usually used to visualize the differences between model elements.
Description of comparison strategies

Comparing view only, model element only, or both

Comparison is divided into view, model element and both of them. The selected option from the drop-down menu of Compare determines the display for comparison. By selecting View, the differences in view settings, such as the coordination of shapes, will be considered as changes. By selecting Model Element, the differences in model element level, such as their names, will be considered as changes. By selecting All, the differences in both view settings and model element level are displayed.

The following screenshot displays both view and model element differences:

Compare All
Compare All

The result of selecting View is shown as follows:

Compare View
Compare View

The result of selecting Model Element is shown as follows:

Compare Model Element
Compare Model Element

Comparing from the left to the right and vice versa

Comparisons are made between two diagrams, which are put on the left and the right hand side in the Visual Diff dialog box respectively. By default, comparison is based on left hand side, which means, if a shape does not exist on the left hand side but on the right hand side, the shape will be considered as newly added in the result pane. The base can be swapped from the right to the left, and vice versa. By doing so, the absence of shape on the left hand side will result in a report of deleted shape.

Comparing diagrams with right hand side as base
Comparing diagrams with right hand side as base

The result of left hand side as base is shown below. The deleted model element is regarded as an addition (it indicates as New).

Comparing diagrams with left hand side as base
Comparing diagrams with left hand side as base

Sorting the data on result pane

The selected option from the drop-down menu of Sort determines the order of data on the result pane. You can select sort by type, by name or by change type.

The result of selecting Type is shown as follows:

Sort by type
Sort by type

The result of selecting Name is shown as follows:

Sort by name
Sort by name

The result of selecting Change Type is shown as follows:

Sort by change type
Sort by change type

Exporting a report of differences

A report of the current comparing diagrams can be saved in your computer as PDF. Click Export PDF... button on the bottom left corner of the dialog box. Select a directory for storing in Export PDF dialog box and then click Save button.

Click Export PDF... button
Click Export PDF... button