Main Content

exportToVersion

Export a Simulink.data.Dictionary object to a previous version

Description

exportToVersion(dictionaryObj,target_folder,version) exports the data dictionary dictionaryObj to the folder target_folder in a format that the specified previous Simulink® version can load. The function also exports references to the specified folder. The file names of the dictionary and its references are preserved.

example

Examples

collapse all

Represent the data dictionary sldemo_fuelsys_dd_controller.sldd with a Simulink.data.Dictionary object named myDictionaryObj.

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

Export the data dictionary to a previous version of Simulink.

exportToVersion(myDictionaryObj,'myR2018aFolder','R2018a');

Input Arguments

collapse all

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.

Target folder for the new version of the dictionary, specified as a character vector or string scalar.

Example: 'myR2018aFolder'

Data Types: char | string

MATLAB release name, specified as a character vector or string scalar, which specifies a previous Simulink version. The release name is not case sensitive. Simulink.data.Dictionary.exportToVersion exports the data dictionary to a format that the specified previous Simulink version can load. The value must be R2014a or later. You cannot export to your current version.

Example: 'R2018a'

Data Types: char | string

Version History

Introduced in R2018b