This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Simulink.BlockDiagram.expandSubsystem

Replace subsystem with subsystem contents

Syntax

Simulink.BlockDiagram.expandSubsystem(block)
Simulink.BlockDiagram.expandSubsystem(block,'CreateArea',specifier)

Description

example

Simulink.BlockDiagram.expandSubsystem(block) expands the subsystem block into the system that contains the subsystem. Open or load the model first.

You can expand virtual subsystems that are not masked, linked, or commented. For details, see Subsystems That You Can Expand.

Simulink.BlockDiagram.expandSubsystem(block,'CreateArea',specifier)prevents creating an area around the expanded subsystem.

Input Arguments

collapse all

Subsystem to expand, specified as the block path name or block handle.

Example: 'sldemo_enginewc/Combustion'

Option to specify whether to create an area, specified as 'On' to create the area, or 'Off' to not create the area.

Examples

collapse all

Open the model sldemo_enginewc. Expand the Combustion subsystem.

open_system('sldemo_enginewc')
Simulink.BlockDiagram.expandSubsystem('sldemo_enginewc/Combustion')

The subsystem contents appear in the top level of the model.

Expand the Combustion subsystem. The blocks and signals in the Combustion subsystem become part of the system and replace the Subsystem block.

Open the model sldemo_enginewc. Expand the Combustion subsystem but do not create an area.

open_system('sldemo_enginewc')
Simulink.BlockDiagram.expandSubsystem('sldemo_enginewc/Combustion','CreateArea','Off')

Introduced in R2014a