Main Content

Simulink.data.dictionary.Section

Configure data dictionary section

Description

An object of the Simulink.data.dictionary.Section class represents one section of a data dictionary, such as Design Data or Configurations. The object allows you to perform operations on the section such as add or delete entries and import data from files.

Note

For most common data management tasks involving a model workspace, Simulink® data dictionary (Design Data section), or MAT file, it is recommended to use the functions provided by the Simulink.data.DataConnection object over the data source-specific functions. These object functions provide a common command line interface to manage the data using fewer lines of code. Use the Simulink.data.connect function to create a connection to your data source, then use the common set of functions provided by the Simulink.data.DataConnection object. For data source-specific tasks, for example the removal or addition of a reference data dictionary, create a data source-specific object, then use the functions provided by that object to manage your data source. For more information, see Manage Design Data for Simulink Models Programmatically.

Before you can create a Simulink.data.dictionary.Section object, you must create a Simulink.data.Dictionary object representing the target data dictionary. Once created, the Simulink.data.dictionary.Section object exists independently of the Simulink.data.Dictionary object.

You cannot use the data dictionary programmatic interface (see Store Data in Dictionary Programmatically) to access the Embedded Coder section of a data dictionary. Instead, see Embedded Coder Dictionary (Embedded Coder).

Creation

Syntax

Description

The function getSection creates a Simulink.data.dictionary.Section object.

Properties

expand all

Name of data dictionary section, returned as a character vector. This property is read only.

Object Functions

addEntryAdd new entry to data dictionary section
assigninAssign value to data dictionary entry
deleteEntryDelete data dictionary entry
evalinEvaluate MATLAB expression in data dictionary section
existCheck existence of data dictionary entry
exportToFileExport data dictionary entries from section to MAT-file or MATLAB file
find Search in data dictionary section
getEntryCreate Simulink.data.dictionary.Entry object to represent data dictionary entry
importFromFileImport variables from MAT file or MATLAB file to data dictionary section

Examples

collapse 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');

Represent the Design Data section of the data dictionary myDictionary_ex_API.sldd with a Simulink.data.dictionary.Section object named dDataSectObj.

dDataSectObj = getSection(myDictionaryObj,'Design Data')
dDataSectObj = 

  Section with properties:

    Name: 'Design Data'

Version History

Introduced in R2015a