Documentation

Simulink.data.dictionary.create

Create new data dictionary and create Simulink.data.Dictionary object

Syntax

dictionaryObj = Simulink.data.dictionary.create(dictionaryFile)

Description

example

dictionaryObj = Simulink.data.dictionary.create(dictionaryFile) creates a data dictionary file in your current working folder or in a file path you can specify in dictionaryFile. The function returns a Simulink.data.Dictionary object representing the new data dictionary.

Examples

collapse all

Create a data dictionary myNewDictionary.sldd in your current working folder and a Simulink.data.Dictionary object representing the new data dictionary. Assign the object to the variable myDictionaryObj.

myDictionaryObj = Simulink.data.dictionary.create('myNewDictionary.sldd')
myDictionaryObj = 

  data dictionary with properties:

          DataSources: {0x1 cell}
    HasUnsavedChanges: 0
           NumberOfEntries: 0

Input Arguments

collapse all

Name of new data dictionary, specified as a character vector containing the file name and, optionally, path of the dictionary to create. If you do not specify a path, Simulink.data.dictionary.create creates the new data dictionary file in your working MATLAB folder. Simulink.data.dictionary.create also supports file paths specified relative to your working folder.

Example: 'myDictionary.sldd'

Example: 'C:\Users\jsmith\myDictionary.sldd'

Example: '..\myOtherDictionary.sldd'

Data Types: char

Output Arguments

collapse all

Newly created data dictionary, returned as a Simulink.data.Dictionary object.

Alternatives

You can use the Simulink Editor to create a data dictionary and link it to a model. See Migrate Single Model to Use Dictionary for more information.

Introduced in R2015a

Was this topic helpful?