Documentation Center

  • Trial Software
  • Product Updates

getProjectName

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

(To be removed) Get the name of the currently open Simulink project

    Note:   Simulink.ModelManagement.Project.CurrentProject.getProjectName will be removed in a future release. See Simulink Project File Management for links to project functions.

Syntax

p = Simulink.ModelManagement.Project.CurrentProject()
name = p.getProjectName

Description

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

name = p.getProjectName returns the name of the currently open Simulink project.

Example

To get the name of the currently open Simulink project, use the following commands.

  1. Create an instance of the CurrentProject class.

    p = Simulink.ModelManagement.Project.CurrentProject();
  2. Use the getProjectName method.

    name = p.getProjectName;

See Also

Was this topic helpful?