Main Content

Search Model Contents

You can use the Finder to search a Simulink® model, subsystem, or library or a Stateflow® chart for model elements such as blocks and signal lines. For example, you can search for a specific block, or you can search for all the Constant blocks in the model. You can also search for parameters, functions, annotations, events, or messages.

You can narrow your search by filtering the search results.

Tip

If you want to filter the model content inventory for items of a certain type or with certain properties, you can also use the Model Data Editor.

To search for the source or destination of a signal and trace signal paths, see Highlight Signal Sources and Destinations.

If your model contains blocks that connect without signal lines, given one such block, you can highlight or jump to the blocks it connects to. For more information, see Search for Blocks Connected Without Signal Lines.

To search for Simulink Editor actions, see Keyword Search for Simulink Editor Actions.

Keyword Search for Model Elements and Parameters

You can use the Finder to perform a keyword search for model elements and parameters.

To open the Finder, select the Simulink Editor and press Ctrl+F.

In the search box, type a keyword or key phrase, then press Enter. The keyword or key phrase can be any in this table.

Keyword or Key PhraseExample
Name of an itemA block name or a signal line label
Type of itemsignal or subsystem
Property valueName of a variable used to set the Constant value of a Constant block
Label stringCondition of a Stateflow transition
Words or phrases in a scriptLine of code in a MATLAB Function block
Words or phrases in a descriptionPhrase from a block description
Name of a sourceFor a signal line, the block to whose input port the signal line connects
Name of a destinationFor a signal line, the block to whose output port the signal line connects

The search results highlight matches for the keyword or key phrase in the Names column.

To navigate to a search result in the model, in the Finder, in the Name column, double-click the item.

The video show the Finder open in the sldemo_fuelsys. The search box contains the key phrase throttle transient. The pointer clicks the Find button next to the search field. The search results table populates. The pointer double-clicks a highlighted search result in the Name column. The search result is the name of a block. The subsystem containing the block opens. The block is highlighted in the canvas.

To change the scope of the search, click Change the search scope and select one of these options:

  • Search from top model

  • Search this level and below

  • Search this level only

When a search returns too many results, narrow your search using the advanced settings . For more information, see Perform Advanced Search.

You can also use the Finder to replace text in the model. For more information, see Find and Replace Text.

Search for Blocks Connected Without Signal Lines

Related blocks connect without signal lines. To search for related blocks, select one of the related blocks. All blocks related to the selected block highlight in purple. Blocks that contain related blocks also highlight in purple.

Alternatively, select one of the related blocks, then pause on the ellipsis that appears. In the action bar that expands, click Related Blocks . If more than one related block is present, a list of related blocks appears. Select the block you want to find. The part of the model containing the block opens, and the related block temporarily highlights.

The video shows the pointer selecting a Discrete Integrator block in a model. The model contains an Initialize Function, a Reset Function, and a Terminate Function block. When the pointer selects the Discrete Integrator block, the three function blocks highlight in purple. The pointer pauses on the ellipsis that hovers above the Discrete Integrator block. The action bar expands. The pointer clicks the Related Blocks button. A list of related blocks appears. The pointer selects the State Reader block. The Terminate Function block opens, and the State Reader block highlights in blue.

See Also

|

Related Topics