Simulation Studio includes a search feature that you can use to locate blocks, compound blocks, or submodels in a particular model that satisfy specified criteria. You can open the Search dialog box, shown in Figure 4.7, by pressing CTRL-F when the Model window is active. If you click anywhere outside the Search dialog box, then the Search dialog box automatically closes. You can press CTRL-F to open it again.
Figure 4.7: Sample Search Dialog Box
In the Search dialog box, you can specify a whole or partial block label name in the Search String box. This search string is used at the label-matching phase of the search process to select any blocks that have a label that matches the specified string. Select the Case Sensitive check box to indicate that the search should find only blocks with a label that matches the specified case-sensitive string. If the Search String box is blank, then the block label is not used during the search.
The Search For section of the dialog box enables you to select one of three categories of blocks to search: simple block, compound block, or submodel. If you select the Simple Block option, then you can specify the type of simple block (Entity Generator, Delay, Formula, and so on) in the Type list. Select All Types to indicate that the search should be applied to all simple block types. If you select the Compound Block option, then the Type list is not available.
After you select a block category and specify a search string (if necessary), click Search to execute the search process. When the search is complete, the Search Results box is populated with a list of block labels that satisfy the specified search criteria. You can then select block labels that are listed in the Search Results box to locate the corresponding block in your model. If the Show Properties check box is selected when you execute a search, then the Block Properties dialog box for a selected block in the Search Results field automatically appears, and you can inspect or edit the block properties as needed. If the Auto Sync Forward check box is selected when you execute a search, then the Model window scrolls to display the selected block in the Search Results field. If the block is one or more levels deep inside a collapsed compound block, then the compound blocks are automatically expanded to show the selected block.
If the Auto Sync Forward check box is not selected, then you can click Sync Forward to manually scroll the Model window until the selected block is displayed. If you click Sync Forward and the selected block is inside a collapsed compound block, then the compound block is automatically expanded to display the selected block. You can then click Sync Backward to automatically undo the sync forward operation and restore the collapsed status of the selected block’s parent compound block.