How to ensure all of our models and subsystems are centered on the screen and are at 100% zoom?
조회 수: 5 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2019년 1월 2일
답변: MathWorks Support Team
2019년 1월 4일
Hello, We have been trying to get a reliable and quick way to ensure all of our models and subsystems are centred on the screen and are at 100% zoom.
채택된 답변
MathWorks Support Team
2019년 1월 16일
The following script ensures ensure all of your models and subsystems are centered on the screen and are at 100% zoom:
subSys = find_system( modelname, 'BlockType', 'SubSystem' );
for ss=1:length(subSys)
subs_h = get_param( subSys{ss}, 'handle' );
open_system( subs_h, 'tab' );
set_param( subSys{ss}, 'ZoomFactor', 'FitSystem' );
set_param( subSys{ss}, 'ZoomFactor', '100' );
close_system( subs_h, 'tab' );
end
As of R2018b there is no better workflow than opening a script and using the "set_param" command to center and zoom individual subsystems.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!