Compose Dictionary Hierarchy

Link two models that are part of a model reference hierarchy to separate data dictionaries. Then link the top model to its own data dictionary. Finally, create a dictionary hierarchy in which the dictionary linked to the top model is the parent dictionary.

  1. Open the model sldemo_fuelsys_dd_controller, which is part of a model reference hierarchy whose top model is sldemo_fuelsys_dd.

  2. In the Simulink® Editor, click File > Model Properties > Link to Data Dictionary.

  3. In the Model Properties dialog box, set Defined in to Data Dictionary and click New to create a data dictionary.

  4. Name the data dictionary sldemo_fuelsys_dd_controller.sldd, save it, and click Apply.

  5. Click Yes in response to the message that explains how Simulink migrates design data stored in the base workspace.

    A message appears, reporting the number of items imported to the data dictionary.

  6. Similarly, open the model sldemo_fuelsys_dd_plant, which is also part of a model reference hierarchy whose top model is sldemo_fuelsys_dd. Then link this model to a new data dictionary called sldemo_fuelsys_dd_plant.sldd.

  7. Open the top model sldemo_fuelsys_dd, and link it to a data dictionary called sldemo_fuelsys_dd.sldd.

    This dictionary serves as the parent dictionary

  8. Open the data dictionaries linked to these three models by clicking the data dictionary badge in the bottom left corner of each model.

    This dictionaries appear in Model Hierarchy pane of the Model Explorer.

  9. Select the sldemo_fuelsys_dd node, and click Add Reference in the dialog pane. Browse to locate the two dictionaries created for the referenced models and add them as references to the parent dictionary.

    Entries from all referenced dictionaries appear in the parent dictionary as well.

Related Examples

More About

Was this topic helpful?