Main Content

slImportFavoriteCommands

Import favorite commands to Simulink quick access toolbar

Description

example

backup = slImportFavoriteCommands(file) imports favorite commands and categories from the specified file to the Simulink® Favorite Commands gallery.

example

backup = slImportFavoriteCommands(file,'overwrite') overwrites the contents of the Simulink Favorite Commands gallery with the contents of the specified file.

Examples

collapse all

Suppose a team member shares a file that contains favorite commands you want to use in Simulink, and you want to merge the file contents with the contents of your Simulink Favorite Commands gallery.

In the MATLAB® Command Window, enter:

slImportFavoriteCommands('B:\path\slFavorites.mat');

Suppose a team member shares a file that contains favorite commands you want to use in Simulink, and you want to overwrite the contents of your Simulink Favorite Commands gallery with the file contents.

In the MATLAB Command Window, enter:

slImportFavoriteCommands('B:\path\slFavorites.mat','overwrite');

Input Arguments

collapse all

File name or path, including a .mat file extension, specified as a character vector or string scalar.

Example: slImportFavoriteCommands('B:\path\slFavorites.mat')

Data Types: char | string

Output Arguments

collapse all

Backup of previous state, returned as a character vector.

To restore the previous state, you can pass the returned value as the input to the function and overwrite the current state.

Introduced in R2021b