Main Content

System Composer Comparison Tool

View differences between two architecture models

Since R2022a

Description

The Comparison Tool in System Composer™ shows differences between two architecture models.

For the Simulink® version of this tool, see Comparison Tool.

The tool shows differences for these types of architectural data:

  • Model structural differences (components, ports, and connectors)

  • Different types of supported components and ports

  • Interfaces on model data dictionaries

  • Owned port interfaces

  • Applied stereotypes and property value changes on model elements

  • Profiles

  • Architecture views

  • Sequence diagrams

  • Parameters

  • Simulink properties

Note

You can now merge and resolve conflicts from the comparison report in System Composer. For more information, see Resolve Conflicts in Projects Using System Composer Three-Way Merge Tool.

Rows in the comparison report are highlighted according to the type of difference:

  • Insertion teal highlight — Added elements to the right side that did not exist on the left side

  • Deletion gold highlight — Removed elements that did exist on the left side but not on the right side

  • Modification purple highlight — Changes to existing elements that exist on both the left and right sides

Comparison Tool

Open the System Composer Comparison Tool

You can select files and folders on disk to compare using one of these methods:

  • Files or Project panel — To compare two files on disk, select both files. Then, right-click and select Compare Selected Files/Folders. The Comparison Tool opens the file you select first on the left.

  • Command Window — Use the visdiff function.

For files under source control, you can open the Comparison Tool to understand differences between revisions using one of the following methods.

  • Files or Project panel — To compare a file to its ancestor, select Source Control > View Changes. To compare the file to a different revision, right-click the model file and select Show Revisions. In the Log dialog box, select the revision and click Compare to Local.

  • Branch Manager — To inspect changes in a file between two Git™ revisions, open the Branch Manager. Right-click and select Source Control > Branch Manager. In the Commit Differences pane, right-click a file and select Show Differences.

Parameters

expand all

Swap sides of the two models being compared on the comparison report.

When the architecture models are out of sync, pull in the changes to the comparison report. You must save both architecture models first before clicking Refresh.

When Always Highlight is turned off, you can click Highlight Now to highlight the currently selected comparison report node in the architecture models.

By default, the two models being compared display to the right of the comparison report, with the model corresponding to the left side of the report on top and the model corresponding to the right side appearing below. Turn Always Highlight off to use the Highlight Now button and control highlighting in the models.

Access this check box from the Filter menu. When selected, graphical changes such as component positioning and resizing are ignored from the comparison report.

Programmatic Use

expand all

visdiff("scMobileRobot.slx","scMobileRobotEdited.slx") opens the Comparison Tool from the MATLAB® Command Window.

Version History

Introduced in R2022a

expand all