Documentation

removeShortcut

Remove shortcut from Simulink project

Syntax

removeShortcut(project,file)

Description

example

removeShortcut(project,file) removes the shortcut to the specified file in the Simulink® project.

Examples

collapse all

Create a project and get a project object.

sldemo_slproject_airframe;
project = simulinkproject;

Create a new file.

filepath = fullfile(project.RootFolder, 'new_model.slx')
     new_system('new_model');
     save_system('new_model', filepath)

Add this new model to the project.

projectFile = addFile(project, filepath)

Add a new shortcut to the new model.

shortcut = addShortcut(project, filepath);

Remove the shortcut.

removeShortcut(project, shortcut);

Input Arguments

collapse all

Project, specified as a project object. Use simulinkproject to create a project object to manipulate a Simulink project at the command line.

Path of the shortcut file, relative to the project root folder, including the file extension, specified as a character vector. The file must be within the root folder.

Example: ‘models/myModelName.slx’

Introduced in R2017a

Was this topic helpful?