Add referenced project to Simulink project
projreference = addReference(project,folder)
projreference = addReference(project,folder,type)
Create a project and get a project object.
sldemo_slproject_airframe; project = simulinkproject;
Create a new blank project.
projectToReference = slproject.create();
Reload the first project and add a reference to the new blank project.
reload(project); addReference(project, projectToReference, 'absolute');
Find out if a project is a top-level project. 1 indicates a top-level project.
ans = logical 1
Project, specified as a project object. Use
simulinkproject to create a project
object to manipulate a Simulink project at the command line.
folder— Path of folder
Path of the folder to add the reference, relative to the project root folder, specified as a character vector. The folder must be within the root folder.
type— Type of reference
Type of reference, relative to the project root folder, specified as a character vector.
projreference— Project reference
Project reference object containing information about the referenced project.