show

Class: Simulink.data.Dictionary
Package: Simulink.data

Show data dictionary in Model Explorer

Syntax

show(dictionaryObj)
show(dictionaryObj,openModelExplorer)

Description

show(dictionaryObj) opens Model Explorer and displays the data dictionary dictionaryObj as the selected tree node in the Model Hierarchy pane.

show(dictionaryObj,openModelExplorer) enables you to add the target dictionary to the Model Hierarchy pane without opening Model Explorer.

Input Arguments

expand all

Target data dictionary, specified as a Simulink.data.Dictionary object. Before you use this function, represent the target dictionary with a Simulink.data.Dictionary object by using, for example, the Simulink.data.dictionary.create or Simulink.data.dictionary.open function.

Flag to open Model Explorer, specified as true or false.

Data Types: logical

Examples

expand all

Open the data dictionary myDictionary_ex_API.sldd and represent it with a Simulink.data.Dictionary object named myDictionaryObj.

myDictionaryObj = Simulink.data.dictionary.open('myDictionary_ex_API.sldd');

Open Model Explorer and display myDictionary_ex_API as the selected node of the model hierarchy tree in the Model Hierarchy pane.

show(myDictionaryObj)

Open the data dictionary myDictionary_ex_API.sldd and represent it with a Simulink.data.Dictionary object named myDictionaryObj.

myDictionaryObj = Simulink.data.dictionary.open('myDictionary_ex_API.sldd');

Add myDictionary_ex_API.sldd to the model hierarchy tree without opening Model Explorer.

show(myDictionaryObj,false)

You can confirm the addition of myDictionary_ex_API to the model hierarchy tree by manually opening Model Explorer.

Tips

  • Use the hide function to remove a data dictionary from the tree in the Model Hierarchy pane of Model Explorer. The dictionary does not appear in the hierarchy again until you use the show function or you open and view the dictionary in the Model Explorer using the interface.

Introduced in R2015a