Main Content


Add reference data dictionary to parent data dictionary



addDataSource(dictionaryObj,refDictionaryFile) adds a data dictionary, refDictionaryFile, as a reference dictionary to a parent dictionary dictionaryObj, a object.

The parent dictionary contains all the entries that are defined in the referenced dictionary until the referenced dictionary is removed from the parent dictionary. The DataSource property of an entry indicates the dictionary that defines the entry.


collapse all

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

myDictionaryObj ='myDictionary_ex_API.sldd');

Add the data dictionary mySubDictionary_ex_API.sldd as a reference dictionary to myDictionary_ex_API.sldd.


Confirm the addition by viewing the DataSources property of variable myDictionaryObj. The property returns the name of the newly referenced dictionary.

ans = 


Input Arguments

collapse all

Parent data dictionary, specified as a object. Before you use this function, represent the target dictionary with a object by using, for example, the or function.

File name of data dictionary to reference, specified as a character vector that includes the .sldd extension. The data dictionary file must be on your MATLAB path.

Example: 'mySubDictionary_ex_API.sldd'

Data Types: char


You can use the Model Explorer window to manage reference dictionaries. See Partition Dictionary Data Using Referenced Dictionaries for more information.

Version History

Introduced in R2015a