Partition Dictionary Data Using Referenced Dictionaries

This example shows how to partition a data dictionary into reference dictionaries that can be shared in a team. A Simulink® data dictionary permanently stores model data including MATLAB® variables, data objects, and data types.

Open dictionary for partitioning

  1. Open the Model Explorer. In the Simulink Editor, in the Modeling tab, click Model Explorer.

  2. Select File > Open.

    Browse and locate your dictionary.

Create reference dictionary

Use a reference dictionary to store a subset of entries from the main dictionary.

  1. Select File > New > Data Dictionary.

    Name the reference dictionary and save it.

    Both dictionaries appear as nodes in the Model Hierarchy pane.

  2. In the Model Hierarchy pane, select the dictionary that serves as the parent.

  3. In the dialog box pane, in the Referenced Dictionaries section, click Add Reference. Browse to the location of the reference dictionary and add it as a reference.

Move entries into reference dictionary

  1. In the Model Hierarchy pane, select the Design Data node of the parent dictionary.

  2. In the Contents pane, select the entries you want to move to the reference dictionary.

  3. For one of the selected entries, set DataSource to the reference dictionary using the dropdown menu. You can also drag and drop entries between dictionaries.

    To make the DataSource column visible, click Show Details in the Contents pane. In the text box, enter DataSource, and add DataSource to the list of displayed columns.

Organize display of entries

  1. Click the name of the DataSource column to sort the entries by the dictionaries that define them.

  2. Right-click the name of the DataSource column and select Group by This Column to group the entries. The Contents pane creates a group for each dictionary that defines the entries.

Related Topics