Main Content

Simulink.BlockDiagram.deleteContents

Delete graphical contents of system

Description

example

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

Examples

collapse all

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

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

A system 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.

Introduced in R2007a