Search Inside Project Files and Filter File Views

Project-Wide Search

In Simulink® Project, you can search inside all your models and supporting files. You can find matches inside model files, MATLAB® files, and other project files such as PDF and Microsoft® Word files. You search only the current project. If you want to search referenced project files, open the referenced project.

  1. On the Simulink Project tab, click Search. Alternatively, type in the file filter box, and the project provides a link to try searching inside files instead.

  2. In the Search Inside Simulink Project Files dialog box, enter some characters to search for. Do not use quotes around phrases, or hyphens.

  3. Expand files in the list to see results inside the file. Double-click results to locate specific items, e.g., highlight blocks in Simulink models, or highlight specific lines in MATLAB files.

  4. Click Filters to refine results by file type, status, or label.

Filter Project File Views

In the Simulink Project Files, Batch Job, and Dependency Analysis views, you can use the search box and filtering tools to specify file display.

  • To view files, select the Files node. When Project Files View is selected, only the files in your project are shown. To see all the files in your sandbox, click the Project Files View button and select All Files View. This view shows all the files that are under the project root, not just the files that are in the project.

  • To search, type a search term in the search box, for example, part of a file name or a file extension. You can use wildcards, for example, *.m, or *.m*.

    Click X to clear the search.

  • To build a filter for the current view, click the filter button .

    In the Filter Builder dialog box you can select multiple filter criteria to apply using names, file types, project status, and labels.

    The dialog box reports the resulting filter at the bottom, for example:

    Filter = file type is 'Model files (*.slx, *.mdl)' AND project status
     is 'In project' AND has label 'Engine Type:Diesel'
    When you click Apply, the search box shows the filter that you are applying.

More Ways to Search

You can also search:

  • Model contents without loading the models into memory. On the MATLAB Home tab, in the File section, click Find Files. You can search a folder or the entire path. However, you cannot highlight results in models from the results in the Find Files dialog box the same way you do with project search. See Advanced Search for Files.

  • A model hierarchy. In the Simulink Editor, select Edit > Find. Select options to look inside masks, links, and references. This search loads the models into memory. See Find Model Elements in Simulink Models

  • For variables, block parameter values, or search a model hierarchy and contents using more options, using the Model Explorer. This search loads the models into memory. Use the Model Explorer to search for variables in workspaces and data dictionaries, and variable usage in a model. See Edit and Manage Workspace Variables Used by Models

Related Examples

Was this topic helpful?