Main Content

listEntry

List data dictionary entries

Description

listEntry(dictionaryObj) displays in the MATLAB Command Window a table of information about all the entries in the data dictionary dictionaryObj, a Simulink.data.Dictionary object. The displayed information includes the name of each entry, the name of the section containing each entry, the status of each entry, the date and time each entry was last modified, the last user name to modify each entry, and the class of the value each entry contains. By default, the function sorts the list of entries alphabetically by entry name.

example

listEntry(dictionaryObj,Name,Value) displays the entries in a data dictionary with additional options specified by one or more Name,Value pair arguments.

To return the value of a data dictionary entry at the command prompt, use the getValue method of a Simulink.data.dictionary.Entry object. See Store Data in Dictionary Programmatically.

To get a list of entries in a dictionary section, returned as an array of Simulink.data.dictionary.Entry objects, use the find method of a Simulink.data.dictionary.Section object with no arguments.

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

List all the entries in the data dictionary.

listEntry(myDictionaryObj)

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

List all the entries in the data dictionary and sort the list in descending order by entry name.

listEntry(myDictionaryObj,'Ascending',false)

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

List only the entries in the data dictionary whose names begin with max.

listEntry(myDictionaryObj,'Name','max*')

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

List all the entries in the dictionary and sort the list by the date and time each entry was last modified.

listEntry(myDictionaryObj,'SortBy','LastModified')

Input Arguments

collapse all

Target 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.

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: 'SortBy','LastModified' sorts the entries in the data dictionary by the date and time each entry was last modified.

Sort order of the list of data dictionary entries, specified as the comma-separated pair consisting of 'Ascending' and true or false. If you specify false, listEntry sorts the list in descending order.

Example: 'Ascending',false

Data Types: logical

Criteria to filter the list of data dictionary entries by class, specified as the comma-separated pair consisting of 'Class' and a character vector identifying a valid class. The function lists only entries whose values are of the specified class.

Example: 'Class','Simulink.Parameter'

Data Types: char

Criteria to filter the list of data dictionary entries by the user name of the last user to modify each entry, specified as the comma-separated pair consisting of 'LastModifiedBy' and a character vector identifying the specified user name. The function lists only entries that were last modified by the specified user name.

Example: 'LastModifiedBy','jsmith'

Data Types: char

Maximum number of entries to list, specified as the comma-separated pair consisting of 'Limit' and an integer. The function lists up to the specified number of entries starting from the top of the sorted and filtered list.

Example: 'Limit',9

Data Types: double

Criteria to filter the list of data dictionary entries by entry name, specified as the comma-separated pair consisting of 'Name' and a character vector defining the filter criteria. You can use an asterisk character, *, as a wildcard to represent any number of characters. The function lists only entries whose names match the filter criteria.

Example: 'Name','fuelFlow'

Example: 'Name','fuel*'

Data Types: char

Criteria to filter the list of data dictionary entries by section, specified as the comma-separated pair consisting of 'Section' and a character vector identifying the target section. The function lists only entries that are contained in the target section.

Example: 'Section','Design Data'

Flag to sort the list of data dictionary entries by a specific property, specified as the comma-separated pair consisting of 'SortBy' and a character vector identifying a property in the list of entries. Valid properties include 'Name', 'Section', 'LastModified', and 'LastModifiedBy'.

Example: 'SortBy','LastModifiedBy'

Version History

Introduced in R2015a