Auto Layout Tool

Version 2.3 (3.26 MB) by McSCert
The Auto Layout Tool is used to automatically improve the layout of Simulink models.
Updated 22 Jul 2020

Modeling operations often perturb a model's layout. Layout readjustment is usually needed, and represents a tedious activity if performed manually. Although achieving a proper layout of a Simulink model is deemed very important, there does not exist a comprehensive commercial automatic layout tool for Simulink models. The Auto Layout Tool resizes models' blocks based on number of inputs and outputs, and organizes the signal lines such that the number of crossings is minimized. Auto Layout Tool can leverage three different layout approaches: 1) "Graphviz", a third-party open source tool for drawing graphs; 2) Matlab’s built-in "GraphPlot" layout capability; 3) an in-house "DepthBased" method. Approaches 1) and 3) can be utilized on any version of Matlab/Simulink, while approach 2) only works on R2015b+.

• For installation instructions and instructions on how to use the tool, see Auto-Layout/doc/AutoLayout_UserGuide.pdf.

• This tool relies on our Simulink Utility. Please download it here:

For more about the capabilities of the tool and how it can be used in model-based development with Simulink, see the following two papers:

[1] Vera Pantelic, Steven Postma, Mark Lawford, Alexandre Korobkine, Bennett Mackenzie, Jeff Ong, Marc Bender, "A Toolset for Simulink: Improving Software Engineering Practices in Development with Simulink," In Proceedings of 3rd International Conference on Model-Driven Engineering and Software Development (MODELSWARD 2015), SCITEPRESS, 2015, 50-61. DOI: (Best Paper Award)

[2] Vera Pantelic, Steven Postma, Mark Lawford, Monika Jaskolka, Bennett Mackenzie, Alexandre Korobkine, Marc Bender, Jeff Ong, Gordon Marks, Alan Wassyng, “Software engineering practices and Simulink: bridging the gap,” International Journal on Software Tools for Technology Transfer (STTT), 2017, 95–117. DOI:

Cite As

McSCert (2024). Auto Layout Tool (, GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2019a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Modeling in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

See release notes for this release on GitHub:


– Minor edits to the Installation instructions in the User Guide.
– This tool does not currently support SimScape blocks. This is now mentioned in the User Guide.


– Corrected user guide path in tool description.


– Fixed various bugs that caused errors or resulted in poorer layouts.
– Added new "DepthBased" approach.
– Updated user guide.
– Added new command line options.


Fixed several bugs and improved line routing.

The Auto Layout Tool was tested with R2011b, R2016b, and R2017b.
– The tool can now use Matlab’s built-in layout engine
– Minor improvements have been made to resize blocks
– Annotations are now moved to a consistent location in the resulting model

Updated the "Other Requirements" text.

The tool uses Graphviz, which is a set of tools for drawing graphs (see the user guide for instructions on how to install/setup Graphviz). The Auto Layout Tool has been tested with R2011b, R2015a, R2015b, R2016a, and R2017a.

- Corrected the tool name
Updating formatting of description.

- Fixed issue with the Context Menu

- Addressed issue raised by Ganesh Hegade regarding closing of GUI windows.
- Updated the LineToGoto/From tool to the most recent version ("Line to Goto/From Tool" v1.0 on File Exchange)
- Removed unneeded command line output from Flatten Subsystem

Updating cover image. Removed a "Required Product" from the list.
Added transformations from a From/Goto connection to a signal line connection (and back), as well as a transformation that replaces a virtual subsystem with its content (subsystem flattening).

Added the function getAllLinePoints.m that was missing in the previous release to further improve upon the layout produced by the tool.

– Improved line routing, sizing of blocks, and spacing between blocks,
– Inputs and outputs are now moved to the left and right of a diagram, respectively, unless this increases the number of line crossings.

Now working on Linux and Mac OS X.

Added the cover figure for the tool.

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.