Documentation

slproject.create

Create blank Simulink project

Syntax

proj = slproject.create
proj = slproject.create(path)
proj = slproject.create(name)

Description

example

proj = slproject.create creates and opens a Simulink® project using the blank project template from the start page, and returns a project object. Use the project object to manipulate the currently open Simulink project at the command line. The new project is created in the default project folder. To change the default folder for new Simulink projects, on the Simulink Project tab, click Preferences, and then 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.

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 Simulink 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.

Introduced in R2017a

Was this topic helpful?