Main Content

slproject.create

(Not recommended) Create blank project

slproject.create is not recommended. Use matlab.project.createProject instead. For more information, see Version History.

Description

proj = slproject.create creates and opens a project using the blank project template from the Simulink® start page, and returns a project object. Use the project object to manipulate the currently open project at the command line. The new project is created in the default project folder. To change the default folder for new projects, on the MATLAB® Home tab, click Preferences. In the Preferences dialog box, on the MATLAB Project pane, set the Default folder.

example

proj = slproject.create(path) creates the project at the location specified by path.

example

proj = slproject.create(name) creates the project in the default folder, with the name specified by name.

example

Examples

collapse all

slproject.create

You can control the default folder for new projects using the project preferences.

proj = slproject.create('C:\work\myprojectname');
proj = slproject.create('myprojectname');

Input Arguments

collapse all

Path for the new project location, specified as a character vector. If you do not specify the path, slproject.create creates the project in the default location. You can change the default location in the project preferences.

Example: C:\work\projectname

Data Types: char

Name for the new project, specified as a character vector.

Example: myproject

Data Types: char

Output Arguments

collapse all

Project, returned as a project object. Use the project object to manipulate the currently open project at the command line.

Properties of proj output argument.

Project PropertyDescription
NameProject name
InformationInformation about the project such as the description, source control integration, repository location, and whether it is a top-level project.
DependenciesDependencies between project files in a MATLAB digraph object.
ShortcutsShortcut files in the project.
ProjectPath

Folders that the project puts on the MATLAB path.

ProjectReferencesFolders that contain referenced projects. Contains read-only project objects for referenced projects.
CategoriesCategories of project labels.
FilesPaths and names of project files.
RootFolderFull path to project root folder.

Version History

Introduced in R2017a

collapse all

R2019a: Simulink project API is not recommended

Starting in R2019a, instead of simulinkproject and related functions, use the currentProject or openProject functions in MATLAB. The Simulink project API will continue to be supported, but, after R2019a, new features will be available only if you use the new MATLAB project API. There are no plans to remove the Simulink project API at this time.

You can continue to use simulinkproject and related functions listed in methods(simulinkproject). New functions added after R2019a, such as runChecks and listImpactedFiles, do not work with simulinkproject. Use currentProject instead.

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.