Main Content

Library Browser

Find and add blocks to your model

Description

The Library Browser displays a tree view of the Simulink® libraries on your system. Use the Library Browser to locate blocks and annotations to add to your model.

To navigate the libraries, select libraries from the tree or double-click sublibraries in the right pane. When you select libraries in the tree, the contents of the library appear in the right pane. Sublibraries, blocks, and text and image annotations can appear in the right pane. Pause on any item to see a description. Right-click any item to see options. For example, right-click a block to see options to view block parameters, open help for the block, and add an instance of the block to a model.

When you find the item you are looking for, you can drag it into your model or right-click it and select the option to add it to your model.

Open the Library Browser

  • In the Simulink Toolstrip, on the Simulation tab, click Library Browser.

    You must have a Simulink model, library, or subsystem open to see the Simulink Toolstrip.

  • In the MATLAB® Command Window, enter slLibraryBrowser.

Examples

expand all

You can search for blocks and annotations using the search controls.

  1. In the search box, type the search term or select it from the list of recent search terms.

    Library Browser search box

    For annotations, you can search for any of the text in the annotation or any part of its description.

  2. To use regular expressions, case-sensitive search, or whole-word search, click the Search for subsystems, blocks, and annotations button arrow, then select the search options you want to use.

    Library Browser search options menu

  3. Press Enter to start the search.

    The blocks pane displays the blocks found, grouped by library.

To see where the search string matches, pause on a block.

To navigate to a block library, right-click the block, then select Select in library view.

You can add instances of a library block from the Library Browser to an open model.

Drag the block from the Library Browser to the Simulink Editor canvas.

Alternatively, right-click the block in the Library Browser and select Add block to model or Add block to a new model. If no model is open, this option creates a model and adds the block to it.

Blocks that you have recently added to your model from the Library Browser appear in the Recently Used library at the bottom of the left pane.

By default, library contents appear in alphabetical order. Subsystems appear first, then blocks, and then annotations. If you prefer to view the contents of the libraries in the order set by the developer of the library, right-click the right pane and select Sort in library model order. This setting stays in effect from session to session.

To return to the alphabetical order, right-click and select Sort in alphabetical order. Depending on the library, some items might not appear in alphabetical order. For example, in the Simulink library, the Quick Insert library appears as the last item regardless of the sorting option you choose.

You can create your own libraries and, optionally, have them appear in the Library Browser.

For more information, see Create Custom Library.

Refresh your Library Browser if you:

  • Modify existing libraries or resave them in .slx file format.

  • Move or delete your library files.

  • Add a library.

  • Change your Library Browser customizations. See Customize Library Browser Appearance.

To refresh the libraries displayed in the Library Browser, right-click in the libraries pane and select Refresh Library Browser. The Library Browser updates to display any libraries or blocks added to or deleted from the MATLAB path since the Library Browser was last opened or refreshed.

Tips

You can use keyboard shortcuts to interact with the Library Browser.

TaskAction
Open Library Browser from a modelCtrl+Shift+L
Move selection downDown arrow
Move selection upUp arrow
Expand a libraryRight arrow
Collapse a libraryLeft arrow
Refresh librariesF5
Navigate to parent libraryEsc
Navigate from search result to library containing blockCtrl+R
Insert the selected block in a new modelCtrl+I
Increase zoomCtrl+Plus (+)
Decrease zoomCtrl+Minus (-)
Reset zoom to defaultAlt+1
Find a blockCtrl+F
Close Library BrowserCtrl+W
Introduced before R2006a