Simulink.ModelManagement.Project.CurrentProject.loadProject

Class: Simulink.ModelManagement.Project.CurrentProject
Package: Simulink.ModelManagement.Project

(To be removed) Load an existing Simulink project and close any currently open project

    Note:   Simulink.ModelManagement.Project.CurrentProject.loadProject will be removed in a future release. Use slproject.loadProject instead.

Syntax

p = Simulink.ModelManagement.Project.CurrentProject()
p.loadProject(pathtoprojectfolder)

Description

p = Simulink.ModelManagement.Project.CurrentProject() creates an instance of the CurrentProject class.

p.loadProject(pathtoprojectfolder) loads the Simulink® project in the pathtoprojectfolder specified.

Loading a project closes any currently open project. If the currently open project is configured to run shutdown shortcuts, the shutdown tasks run before loading the next project.

Input Arguments

pathtoprojectfolder

The complete path to the folder that contains the .SimulinkProject folder.

Example

To load an existing Simulink project, use the following commands.

  1. Create an instance of the CurrentProject class.

    p = Simulink.ModelManagement.Project.CurrentProject();
  2. Use the loadProject method specifying the path to your project folder (that contains the .SimulinkProject folder), for example:

    p.loadProject('C:\work\airframe');
Was this topic helpful?