Main Content

deleteEntry

Delete data dictionary entry

Description

Note

For managing data contained in a connected data source such as a model workspace, Simulink® data dictionary, or MAT file, it is recommended to use the functions provided by the Simulink.data.DataConnection object over the data source-specific functions. These object functions provide a common command line interface to manage the data using fewer lines of code. To create a data connection object for a data source, use the Simulink.data.connect function. For more information, see Manage Design Data for Simulink Models Programmatically.

deleteEntry(entryObj) deletes the data dictionary entry represented by entryObj, a Simulink.data.dictionary.Entry object. The represented entry no longer exists in the data dictionary that defined it.

The function sets the Status properties of any Simulink.data.dictionary.Entry objects representing the deleted entry to 'Deleted'. You can access only the Status properties of the objects.

example

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');

Delete the entry fuelFlow from the data dictionary myDictionary_ex_API.sldd. myDictionary_ex_API.sldd no longer contains the fuelFlow entry.

deleteEntry(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

  • Delete a data dictionary entry by using a Simulink.data.DataConnection object function.

    dd = Simulink.data.connect("myDictionary_ex_API.sldd");
    clear(dd, "fuelFlow");

  • You can use the Model Explorer window to view the contents of a data dictionary and delete entries.

Version History

Introduced in R2015a