(Not recommended) Add shortcut to project
shortcut = addShortcut(project,file)
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);
Project, specified as a project object. Use
create a project object to manipulate a project at the command
file— Path of file
Path of the file to add a shortcut to, relative to the project root folder, including the file extension, specified as a character vector. The file must be within the root folder.
Shortcut object containing information about the shortcut.
Not recommended starting in R2019a
Starting in R2019a, instead of
simulinkproject and related functions,
functions in MATLAB®. The Simulink® project API will continue to be supported, but, after R2019a, new features
might be available only if you use the new MATLAB project API. There are no plans to remove the Simulink project API at this time.
The new MATLAB project API is part of the R2019a functionality enabling you to use projects in MATLAB, with or without Simulink. You can now share projects with users who do not have Simulink.