Documentation

removeLabel

Remove label from金宝appProject

Syntax

labelName removeLabel(类别)
removeLabel(file,categoryName,labelName)
removeLabel(file,labelDefinition)

Description

example

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

example

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

removeLabel(file,labelDefinition)removes the specified labellabelDefinitionfrom the file. Before you can remove the label, you need to get the label from thefile.Labelproperty or by usingfindLabel.

Examples

collapse all

Open the airframe project and create a project object.

sldemo_slproject_airframe; 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.

createLabel(cat,'Future');

Remove the new label.

removeLabel(cat,'Future');

Input Arguments

collapse all

Category of labels, specified as a category object. Get a category object from theproj.Categoriesproperty or by usingfindCategory.

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 usefindFileto 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 thefile.Labelproperty orfindLabel.

Introduced in R2013a

Was this topic helpful?