Align simulink blocks to top left of the window

조회 수: 4 (최근 30일)
Luke Jennings
Luke Jennings 2021년 11월 24일
댓글: Monika Jaskolka 2021년 11월 24일
To try and keep or models neat and consistent we want to have all subsystems zoom set to 100% and aligned to the top left of the window when the model is opened. So I am trying to create an app that is run after the user makes changes to do this. I found this answer https://uk.mathworks.com/matlabcentral/answers/438327-how-to-ensure-all-of-our-models-and-subsystems-are-centered-on-the-screen-and-are-at-100-zoom which helps with the zoom and in all except the top level they seem to happen to open with the blocks aligned to the top left of the window after changing the zoom. What command can I use to ensure that the blocks are located in the top left of the window and one that works at the top level of a model?
Thanks in advance for the help.

답변 (1개)

Monika Jaskolka
Monika Jaskolka 2021년 11월 24일
As far as I am aware, the zooming function is not able to zoom to align blocks on the top left. The ZoomFactor parameter only has the below options, and FitSystem/FitSelection will both try to center the system/selection.
I am not aware of any other commands to move the viewbox in a more precise way.
To zoom only the top-level system, the command is:
set_param(bdroot(gcs), 'ZoomFactor', 'FitSystem')
  댓글 수: 2
Luke Jennings
Luke Jennings 2021년 11월 24일
Thank you for the reply, I agree with what you said I was hoping someone may know of a command that moves the viewbox in a different way. But I do think I might be looking for something that does not exisit.
Monika Jaskolka
Monika Jaskolka 2021년 11월 24일
No problem. Unfortunately it does seem like the functionality either doesn't exist or it exists but is "undocumented" by MathWorks.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Event Functions에 대해 자세히 알아보기

태그

제품


릴리스

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by