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 Phrase | Example |
---|---|
Name of an item | A block name or a signal line label |
Type of item | signal or subsystem |
Property value | Name of a variable used to set the Constant value of a Constant block |
Label string | Condition of a Stateflow transition |
Words or phrases in a script | Line of code in a MATLAB Function block |
Words or phrases in a description | Phrase from a block description |
Name of a source | For a signal line, the block to whose input port the signal line connects |
Name of a destination | For 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.
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 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 a block. All blocks related to the selected block highlight in purple. Blocks that contain related blocks also highlight in purple.
To both find and switch selection to a related block, you can use the Related Blocks button.
Note
The Related Blocks button is not available for blocks from the Dashboard, Customizable Blocks, or Aerospace Blockset™ libraries.
Select a block, 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. Navigate to the name of the block you want to select by clicking or using the arrow keys on your keyboard, then press Enter.
Tip
Instead of the Related Blocks button in the action bar, you can also click the Related Blocks button in the Simulink Toolstrip, on the block-specific tab (for example, the Goto tab of a Goto block).
When you switch the selection, you automatically navigate to the related block that you are switching the selection to. If the block you switch the selection to is located inside a component (for example, a subsystem or model reference), and the selected block is not inside a component or is inside a different component, the component you automatically navigate to opens in a new tab or a new window.