Documentation Center

  • Trial Software
  • Product Updates


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

(To be removed) Remove a label from a file in the currently open Simulink project

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


p = Simulink.ModelManagement.Project.CurrentProject()


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

p.detachLabelFromFile(filePath,labelObj) removes a label from a file specified using filePath using the label object labelObj .

Input Arguments


The fully qualified path to the file from which the label is to be removed.


The label object used to remove the label from the file.


To remove a label from a file labelled with review status Approved, use the following commands.

  1. Create an instance of the CurrentProject class.

    p = Simulink.ModelManagement.Project.CurrentProject();
  2. Create a fully qualified path for the file.

      Note:   The use of the getRootDirectory method in this step is optional.

    file = fullfile(p.getRootDirectory, 'work', 'myExample.c');
  3. Create a label object.

    labelObj = Simulink.ModelManagement.Project.Label('Review','Approved');
  4. Use the detachLabelFromFile method.


See Also

Was this topic helpful?