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

  • Architecture views

  • 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

  • Open the Comparison Tool from the System Composer toolstrip.

    1. Navigate to Modeling > Compare.

    2. In the Select Files or Folders for Comparison dialog box, select the second file against which to compare.

    3. Set the comparison type as System Composer Model Comparison.

    4. Click Compare.

    Select files or folders for comparison.

  • Open the Comparison Tool from the MATLAB® Current Folder browser by selecting one architecture model.

    1. In the MATLAB Current Folder browser, right-click an architecture model.

    2. Select Compare Against and then Choose.

    3. In the Select Files or Folders for Comparison dialog box, select the second file against which to compare.

    4. Set the comparison type as System Composer Model Comparison.

    5. Click Compare.

  • Open the Comparison Tool from the MATLAB Current Folder browser by selecting two architecture models.

    1. In the MATLAB Current Folder browser, select two architecture models.

    2. Right-click and select Compare Selected Files/Folders.

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