Documentation Center

  • Trial Software
  • Product Updates


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

(To be removed) Create a label in a category in the currently open Simulink project

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


p = Simulink.ModelManagement.Project.CurrentProject()
labelObj = Simulink.ModelManagement.Project.Label(categoryName,labelName);


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

labelObj = Simulink.ModelManagement.Project.Label(categoryName,labelName); creates a label object named labelObj for the category categoryName.

p.createLabel(labelObj) creates the label in the category.

If the category for the new label does not exist, it is created with the label object.

Input Arguments


The name of the category in which the new label is to be added.


The name of the new label.


To create a new label John in category Owner in the currently open Simulink project, use the following commands.

  1. Create an instance of the CurrentProject class.

    p = Simulink.ModelManagement.Project.CurrentProject();
  2. Create a label object.

    labelObj= Simulink.ModelManagement.Project.Label('Owner','John');
  3. Add the label to the category.


See Also

Was this topic helpful?