Access Frequently Used Features and Commands in Simulink
The Simulink® quick access toolbar provides access to frequently used operations and favorite commands. This toolbar is always visible, even when you navigate between different Simulink Toolstrip tabs.
To customize the quick access toolbar, you can:
Right-click an item in the toolstrip and select Add to Quick Access Toolbar. To remove a toolstrip item you have added, right-click the item and select Remove from Quick Access Toolbar.
Drag items to change their position.
Show item labels by right-clicking the item icon and selecting Show Label.
Show or hide common items by clicking the Common Controls button and selecting or clearing the corresponding check boxes.
To restore default settings for the quick access toolbar, use one of these options:
Right-click an item and select Restore Defaults.
Click the Common Controls button and select Restore Defaults.
Search for Simulink Toolstrip Actions
To search for Simulink Toolstrip actions, click the Search Toolstrip button . In the search box that appears, start typing the name or description of the toolstrip item, then select it from the quick action search menu.
If the Search Toolstrip button is not in the quick access toolbar, click the Common Controls button and select the Search Toolstrip check box.
Alternatively, you can open the quick action search menu by double-clicking the Simulink Editor canvas and selecting the Actions tab or by pressing the Ctrl + . (period) keyboard shortcut. For more information, see Keyboard Shortcuts and Mouse Actions for Simulink Modeling.
Rerun Favorite Commands for Simulink
The Simulink quick access toolbar provides you with a place to access your favorite MATLAB® commands. Click the Favorites button to open the Favorite Commands gallery.
The list of favorite commands is independent of the list of favorite commands in the MATLAB quick access toolbar.
To create a favorite command:
Click New Favorite. The Favorite Command Editor dialog box opens.
In the Label box, enter a name for the favorite command.
In the Type box, specify whether the favorite command is a script or function. Scripts run in the base workspace. Functions run in a limited scope and receive callback information from the cbinfo variable. For example, if the value of a variable named
var
is1
in the base workspace, a script that runs the commandvar=5
changes the value ofvar
to5
in the base workspace. A function that runs the same command does not change the value ofvar
in the base workspace, because functions do not use the base workspace. For more information, see Base and Function Workspaces.In the Code box, type the statements you want the favorite command to run.
Set Category to an existing category from the drop-down list.
Optionally, set Icon to one of the options provided or a custom icon. Custom icons must be PNG files. If you rename, move, or delete a custom icon, the icon no longer appears in the icon list, and any favorite commands that used the icon revert to the default icon.
Optionally, select Add to quick access toolbar and Show label on quick access toolbar.
Click OK.
To run the statements in the Code box and ensure that they perform the desired actions, click the button for the new command. All the statements in the Code box of the Favorite Command Editor execute as if you ran those statements from the Command Window, although they do not appear in the Command History window.
To edit or delete a favorite command, right-click the command and choose the corresponding option.
To create a new category for your favorite commands:
Click New Category. The Favorite Category Editor dialog box opens.
In the Label box, enter a name for the category.
Click OK.
To reorder categories, click the Move category to top and Move category to bottom buttons to the right of the category names.
To edit or delete a category, right-click the category and choose the corresponding option.
To reset the Simulink
Favorite Commands gallery, use the slResetFavoriteCommands
function.
Share Favorite Commands for Simulink
To export the contents of your Simulink
Favorite Commands gallery to a file that you can share with team
members, use the slExportFavoriteCommands
function. The generated file saves the contents of
the gallery, including the categories and their order.
To import favorite commands from a file, use the slImportFavoriteCommands
function. During import, you can merge the imported
content with existing content or completely overwrite the content of the gallery.
When you merge content:
Imported content appears after existing content.
If the category of an imported command matches an existing category, the imported command is added to the existing category.
Commands can have the same name and properties as each other. A command will not overwrite another command.
See Also
slExportFavoriteCommands
| slImportFavoriteCommands
| slResetFavoriteCommands