createCategory

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

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

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

Syntax

p = Simulink.ModelManagement.Project.CurrentProject()
p.createCategory(categoryName)

Description

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

p.createCategory(categoryName) creates a category named categoryName in the currently open Simulink project.

The new category is created immediately. If you are using a version control tool for your project, you must commit the resulting changes to the .SimulinkProject folder to source control.

Input Arguments

categoryName

The name of the new category.

Examples

To create a new 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. Use the createCategory method.

    p.createCategory('Owner');
Was this topic helpful?