This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Remove label from Simulink Project





removeLabel(category,labelName) removes the label from the specified category of labels in the currently loaded project.


removeLabel(file,categoryName,labelName) removes the specified label in the category categoryName from the file. Use this syntax to specify category and label by name.

removeLabel(file,labelDefinition) removes the specified label labelDefinition from the file. Before you can remove the label, you need to get the label from the file.Label property or by using findLabel.


collapse all

Open the airframe project and create a project object.

proj = simulinkproject;

Examine the first existing category.

cat = proj.Categories(1)
cat = 

  Category with properties:

                Name: 'Classification'
            DataType: 'none'
    LabelDefinitions: [1x8 slproject.LabelDefinition]

Define a new label in the category.


Remove the new label.


Input Arguments

collapse all

Category of labels, specified as a category object. Get a category object from the proj.Categories property or by using findCategory.

Name of the label to remove, specified as a character vector.

File to detach the label from, specified as a file object. You can get the file object by examining the project's Files property (proj.Files), or use findFile to find a file by name. The file must be within the root folder.

Name of the category that contains the label to remove, specified as a character vector.

Name of the label to detach, specified as a label definition object returned by the file.Label property or findLabel.

Introduced in R2013a

Was this topic helpful?