Main Content

Compare Profile Differences Using System Composer Comparison Tool

This example shows how to use the System Composer Comparison Tool to compare two System Composer™ profiles. You can compare profiles to generate a comparison report that includes added, modified, or deleted profiles, stereotypes, and properties.

In this example, the model represents a mobile robot hardware architecture. For more information about profiles, see Extend System Composer Language Elements Using Profiles.

Open System Composer Comparison Tool

To compare profiles, create comparison reports for the XML files that contain the profiles. In this example, you can compare the original version of the MobileRobotProfile profile with the MobileRobotProfileEdited profile.

To open the System Composer Comparison Tool, enter this command.

visdiff("MobileRobotProfile.xml","MobileRobotProfileEdited.xml");

Alternatively, from the Files panel, select the two profile files, right-click, and select Compare Selected Files/Folders.

Understand Profile Comparison Changes

Review the comparison report to explore the differences in your profiles. The comparison report highlights rows according to the type of difference:

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

  • Deletion Yellow 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

Compare Profile Differences

The System Composer comparison report includes changes to profiles, stereotypes, and properties.

In this report, the tool selects the MobileRobotProfile node and shows the details in a pane on the bottom of the report. In the details pane, the modified name is colored in purple. You can see that the Name property of the profile was modified to be MobileRobotProfileEdited in the MobileRobotProfileEdited profile.

The System Composer Comparison Tool open with the comparison report of two profiles.

To step through the differences, on the Comparison tab, in the Navigate section, use the Next and Previous buttons. Alternatively, use the up and down arrows on your keyboard to navigate the report.

The tool selects the CriticalProcess node, which is colored in blue to represent the insertion of this element. You can see that the CriticalProcess stereotype with a SafetyFactor property is inserted in the MobileRobotProfileEdited profile.

The System Composer Comparison Tool open with the CriticalProcess stereotype highlighted in blue. The Profile Property panel displays the Name, UUID, AppliesTo, and Color properties of the CriticalProcess stereotype.

Click Next until the tool selects the TypeOfConnection node, which is colored in purple to represent the modification of this element. In the details pane, you can see that the <Default> property is modified to be 'USB' in the MobileRobotProfileEdited profile.

The System Composer Comparison Tool open with the TypeOfConnection property highlighted in purple. The Profile Property panel displays the <Default> property of the TypeOfConnection stereotype property.

Click Next until the tool selects the UnitCost node, which is colored in blue to represent the insertion of this element. You can see that the UnitCost property is inserted in the MobileRobotProfileEdited profile, under the MechanicalComponent stereotype.

The System Composer Comparison Tool open with the UnitCost property highlighted in blue. The Profile Property panel displays the Name, UUID, Units, and Minimum properties of the UnitCost stereotype property.

Click Next until the tool selects the PowerSupply node, which is colored in yellow to represent the deletion of this element. You can see that the Name, UUID, Applies To, and Color properties of the PowerSupply stereotype are deleted in the MobileRobotProfileEdited profile.

The System Composer Comparison Tool open with the PowerSupply stereotype highlighted in yellow. The Profile Property panel displays the Name, UUID, Applies To, and Color properties of the PowerSupply stereotype.

See Also

Functions

Tools

Topics