Copy graphical contents from subsystem to empty system
Simulink.SubSystem.copyContentsToBlockDiagram(
copies the blocks, lines, and annotations of the specified subsystem to the
top-level block diagram of the specified system. It does not affect nongraphical
information such as configuration sets.subsys
,sys
)
To use this function:
The specified system must be loaded in memory.
The specified subsystem must be loaded in memory.
The specified system must not contain any blocks or lines. Other types
of information can exist in the system and are unaffected by the
function. To delete the graphical content of the system, use Simulink.BlockDiagram.deleteContents
.
To flatten a model hierarchy by replacing a subsystem with its contents, use the
Simulink.BlockDiagram.expandSubsystem
function.
Simulink.BlockDiagram.copyContentsToSubsystem
| Simulink.BlockDiagram.deleteContents
| Simulink.SubSystem.convertToModelReference
| Simulink.SubSystem.deleteContents