Display Items in Original Models

Highlighting in Models

When you compare the XML text files from Simulink® models, you can choose to display the corresponding items in the original models when you select report items. You can use this reverse annotation function to explore the changes in the original models. When you select an item, the report invokes reverse annotation to the original model and highlights the corresponding item in the model.

    Tip   If you click a Subsystem contents node, the report highlights all visible modified objects in the subsystem.

Click a report entry to view the highlighted item (or its parent) in the model:

  • If the item occurs in both models, they both appear with highlighting.

  • If there is no match for the item, the unmatched report item row is green. It is considered unique and appears highlighted by itself. An appropriate system in the other model also displays to show the context of the missing item.

  • If the XML comparison tool cannot highlight an item directly (e.g., configuration parameters), then it highlights the nearest ancestor of the selected node.

The following screenshots show reverse annotation of Simulink and Stateflow® items in original models using the example slxml_sfcarslxml_sfcar.

Control Highlighting in Models

To control highlighting in models, on the View tab in the Comparison Tool, select or clear the check box Always Highlight. You can click the Highlight in Models button to highlight the currently selected report node at any time. This can be useful if you turn off automatic highlighting and only want to display specific nodes.

By default, models display to the right of the comparison report, with the model corresponding to the left side of the report on top, and the right below. If you move or resize the models your position settings are respected by subsequent model highlighting operations within the same session. The tool remembers your window positions.

If you want to preserve window positions across sessions, position the window, and then enter:

slxmlcomp.storeWindowPositions

This preserves the placement of any Simulink windows, Stateflow windows, and truth table windows.

To stop storing window positions and return to the defaults, enter:

slxmlcomp.clearWindowPositions

View Changes in Model Configuration Parameters

You can use the report to explore differences in the model Configuration Parameters. If you select a Configuration Parameter item, the report displays the appropriate root node pane, if possible, of both Configuration Parameters dialog boxes.

The Parameters pane of the report displays the label text from the dialog controls (or the parameter name if it is command line only), and the parameter values. Some configuration parameters have a different hierarchy in the XML file and the dialog box. You can right-click to merge a selected parameter value in the Parameters pane.

Related Examples

More About

Was this topic helpful?