Main Content

Simulink.BlockDiagram.arrangeSystem

Improve layout of block diagram

Description

example

Simulink.BlockDiagram.arrangeSystem(bd) improves the layout of a block diagram by realigning, resizing, and moving blocks and straightening signal lines.

Examples

collapse all

You can use Simulink.BlockDiagram.arrangeSystem with any open model, and it is particularly useful with models you populate programmatically.

Blocks in the model ex_arrange_system are poorly arranged.

open_system('ex_arrange_system')

Blocks in its subsystem are also poorly arranged.

open_system('ex_arrange_system/Subsystem')

Programmatically arrange blocks in the top layer of the specified system.

Simulink.BlockDiagram.arrangeSystem('ex_arrange_system')

Simulink.BlockDiagram.arrangeSystem('ex_arrange_system/Subsystem')

Input Arguments

collapse all

Block diagram of system, specified as a character vector, string scalar, or numeric scalar.

Specify one of the following options:

  • System name (must not include a path or extension)

  • System handle

  • Subsystem block path

Data Types: double | char | string

Introduced in R2018a