Main Content

slDestroyToolstripComponent

Destroy Simulink Toolstrip component

Since R2021b

Description

example

slDestroyToolstripComponent(component) destroys the specified Simulink® Toolstrip component, removes the component directory from the MATLAB® path, and deletes the resource subdirectory that the component directory contains.

slDestroyToolstripComponent(component,RemoveFromPath) destroys the specified Simulink Toolstrip component and deletes the resource subdirectory that the component directory contains. When RemoveFromPath is set to true, the command also removes the component directory from the MATLAB path. When RemoveFromPath is set to false, the command does not remove the component directory from the MATLAB path.

Examples

collapse all

Suppose you have a Simulink Toolstrip component that you no longer need named custom.

Delete the component named custom. In the MATLAB Command Window, enter:

slDestroyToolstripComponent("custom")

Input Arguments

collapse all

Component name, specified as a character vector or string scalar.

The component name appears in the sl_toolstrip_plugins.json file as the value for the "Name" property. Do not edit this file.

Example: slDestroyToolstripComponent("custom")

Data Types: char | string

Option to remove component resource directory from path, specified as a numeric or logical 1 (true) or 0 (false).

Example: slDestroyToolstripComponent("custom",RemoveFromPath=false)

Data Types: logical

Version History

Introduced in R2021b