Main Content

Simulink.BlockDiagram.deleteContents

Delete graphical contents of model

Description

example

Simulink.BlockDiagram.deleteContents(sys) deletes the blocks, lines, and annotations in the specified model. The specified model must be loaded in memory.

Examples

collapse all

Open the example. Then, open the f14 model.

open_system('f14')

Delete the graphical content of the model, including all subsystems.

Simulink.BlockDiagram.deleteContents('f14')

Input Arguments

collapse all

Model name or handle, specified as a character vector, string scalar, or numeric scalar.

A model name must not include a path or extension.

Example: 'mymodel'

Data Types: double | char | string

Tips

To delete the contents of a Subsystem block, use the Simulink.SubSystem.deleteContents function.

Version History

Introduced in R2007a