Library Browser in Standalone Mode
Use standalone Library Browser to find and add blocks to model
You can use the Library Browser in docked mode or in standalone mode. By default, the Library Browser is in docked mode, so the Library Browser window stays to one side of the model and does not cover areas in the model canvas where you want to add items. A Library Browser that is not docked is in standalone mode.
Use standalone mode to:
Add the same items to many Simulink® windows.
View the Library Browser in full-screen mode.
Open, close, hide, or position the Library Browser programmatically.
Browse the libraries without opening a Simulink model.
For an introduction to the Library Browser and more information about docked mode, see Library Browser.
Open the Library Browser in Standalone Mode
Open from Library Browser in docked mode: Click the Launch standalone library browser button .
Open from MATLAB® Command Window: Enter
You can only open one Library Browser in standalone mode.
Library Browser Keyboard Shortcuts
You can use these keyboard shortcuts to interact with the Library Browser in standalone mode.
|Move selection down||Down arrow|
|Move selection up||Up arrow|
|Expand a library||Right arrow|
|Collapse a library||Left arrow|
|Navigate to parent library||Esc|
|Navigate from search result to library containing block||Ctrl+R|
Insert selected block in active model
If no model is open, Add block to a new model creates new model and adds selected block to it
|Increase zoom||Ctrl+Plus (+)|
|Decrease zoom||Ctrl+Minus (-)|
|Reset zoom to default||Alt+1|
|Find a block|
Ctrl+F or F3
|Close Library Browser||Ctrl+W|
When you use the keyboard shortcuts on a Mac, press command (⌘) instead of Ctrl.
Navigate Levels of Library Browser Tree
To navigate the Library Browser in standalone mode, expand the hierarchy of libraries in the tree on the libraries pane.
You can have multiple libraries expanded at once.
To view the contents of a library, click the library name in the tree. The library contents appear in the blocks pane of the Library Browser window.
Library contents can be any combination of blocks, annotations, and libraries that are at a lower level in the hierarchy.
To select the parent library of the open library, right-click on any item in the open library and click Go to parent.
Search for Library Items by Keyword
To search for a library item using key words or phrases, use the search box at the top of the Library Browser.
In the search box, type the search term or select it from the list of recent search terms.
To search for an annotation, type any of the text from the annotation or its description.
To use regular expressions, case-sensitive search, or whole-word search, click the Search for subsystems, blocks, and annotations button and select the search options you want to use.
Press Enter to start the search. The blocks pane displays the search results, grouped by library.
If there are more than 100 search results, the results take up multiple pages in the blocks pane. To navigate to the previous or next page of results, use the arrows in the upper left corner of the Library Browser window.
To see where the search string matches, pause on a block.
To navigate to the library that contains an item in the search results, right-click the item and select Select in library view.
As an example, search for the customizable Knob block.
In the search box at the top of the Library Browser, enter the keyword
Press Enter. The blocks pane shows the search results, which are two Knob blocks.
Pause over the two blocks to find out which is the customizable Knob block. When you pause over the customizable Knob block, this text appears:
Add Blocks and Annotations to Model from Library Browser
To add blocks and annotations from the Library Browser to an open model, right-click the block or annotation and select Add block to model or Add block to a new model. If no model is open, the Add block to a new model 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 tree.
As an example, add a customizable Vertical Gauge block to an open model.
In the search box at the top of the Library Browser, enter
Press Enter. The block pane shows the Vertical Gauge block.
Right-click the Vertical Gauge block and select Add block to model.
Customize Library Browser Appearance
When you resize the libraries panel, the library contents flow to match the width of the window.
You can also programmatically customize the appearance of the Library Browser.
Set the sort priority to change the order of the libraries in the tree.
Expand or collapse libraries in the tree.
For more information and examples, see Customize Library Browser Appearance.
Sort Libraries and Library Contents
The libraries and library contents are first sorted by sort priority and then by sorting order.
Libraries appear in ascending order of sort priority. By default, the Simulink library has a sort priority of -1, and all other libraries have a sort priority of 0. For more information about sort priority, see Customize Library Browser Appearance.
By default, the sorting order is alphabetical. Sublibraries appear first, then subsystems, then blocks, and then annotations.
You can change the sorting order to model order, the order set by the library developer. Typically, model order sorts the contents according to functionality and group related blocks together.
In standalone mode, you can only change the sorting order in the blocks pane. The sorting order of the tree is always alphabetical.
To switch from alphabetical order to model order in standalone mode, right-click the blocks pane or a library item in the blocks pane and select Sort in library model order. This setting is preserved from session to session.
To return to the alphabetical order, right-click the blocks pane or a library item in the blocks pane and select Sort in alphabetical order.
Some libraries do not follow the sorting order. For example, in the Simulink library, the Quick Insert library appears as the last item regardless of the sorting option you choose.
As an example, sort the contents of the Simulink library in model order.
In the Library Browser tree, select the Simulink library.
In the Simulink library, right-click any sublibrary, for example the Dashboard library, and select Sort in library model order. The order of the library changes to model order. In model order, related libraries are grouped together. For example, the Continuous and Discrete sublibraries have two other sublibraries between them when the Simulink library is in alphabetical order but follow each other when the sublibrary is in model order.
Keep Library Browser in Front of Other Windows
To keep the Library Browser in front of other Simulink windows, in the Library Browser toolbar, click Stay on Top .
To turn off this setting, click Stay on Top again.
For information on how to turn on this setting programmatically, see Keep Library Browser in Front of Other Windows.
libraryhandle = slLibraryBrowser
libraryhandle = slLibraryBrowser creates the Library Browser object
LibraryBrowser.LBStandalone and returns the object handle.
When you use
slLibraryBrowser to get the object handle:
If the Library Browser is open in standalone mode, the Library Browser window moves in front of all other Simulink windows.
If the Library Browser is not open in standalone mode, the Library Browser opens in standalone mode.
slLibraryBrowser('close') closes the Library Browser in standalone
slLibraryBrowser('open') opens the Library Browser in standalone
slLibraryBrowser('noshow') loads the Library Browser in memory
without making it visible. Use this command to quickly open the Library Browser
programmatically in standalone mode.
Version HistoryIntroduced before R2006a
R2022b: Docked Simulink Library Browser
Starting in R2022b, the Library Browser button in the Simulink Toolstrip opens a Library Browser that is docked as a panel in the Simulink window. The Library Browser is docked so that the Library Browser window stays to one side of the model and does not cover areas in the model canvas where you want to add items.
When you have multiple Simulink windows open, you can open a docked Library Browser in each one by clicking the Library Browser button of the respective window.