Main Content

Simulink.data.dictionary.create

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

Description

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.

example

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 = 

  Dictionary with properties:

                DataSources: {0x1 cell}  
   HasAccessToBaseWorkspace: 0
EnableAccessToBaseWorkspace: 0
          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.

Version History

Introduced in R2015a