Main Content

showChanges

Display changes made to data dictionary entry

Description

example

showChanges(entryObj) opens the Comparison Tool to show changes made to the data dictionary entry entryObj, a Simulink.data.dictionary.Entry object. The Comparison Tool displays the properties of entryObj as they were when the data dictionary was last saved and as they were when the showChanges function was called.

Examples

collapse all

Represent the data dictionary entry fuelFlow with a Simulink.data.dictionary.Entry object named fuelFlowObj. fuelFlow is defined in the data dictionary myDictionary_ex_API.sldd.

myDictionaryObj = Simulink.data.dictionary.open('myDictionary_ex_API.sldd');
dDataSectObj = getSection(myDictionaryObj,'Design Data');
fuelFlowObj = getEntry(dDataSectObj,'fuelFlow');

Make a change to the entry fuelFlow by assigning it the new value 494.

setValue(fuelFlowObj,494);

Observe the unsaved change to the entry fuelFlow. The Comparison Tool opens and compares side by side the current state of the entry with its most recently saved state.

showChanges(fuelFlowObj)

Input Arguments

collapse all

Target data dictionary entry, specified as a Simulink.data.dictionary.Entry object. Before you use this function, represent the target entry with a Simulink.data.dictionary.Entry object by using, for example, the getEntry function.

Alternatives

You can use Model Explorer and the Comparison Tool to view changes to data dictionary entries. See View and Revert Changes to Dictionary Entries for more information.

Introduced in R2015a