MATLAB: Clean up Simulink block diagram

aligndiagramsimulink

Is there an automatic way rearrange a Simulink block diagram so that it is easy to read? For example:
  • Straighten paths where possible
  • Minimize use of white space so map is compact
  • Align blocks along program flow path
For example, clean_up_simulink(myModel) would perform these tasks then save the revised model.

Best Answer

A year ago, I worked with users and developers ( I called it myself Simulink Beautifier :-) ) to find out if such things are possible. I found myself convinced, that this is a non-trivial undertaking, if you try this in a generic way, as there are too many criteria/rules.
But I know they are customers out there implemented some parts of this. But they all authored own tools. Typically man months of (student) time was invested. I cannot help more specific than saying they created larger MATLAB codes using FIND_SYSTEM, ADD_LINE, SET_PARAM etc.