How to ensure all of our models and subsystems are centered on the screen and are at 100% zoom?
11 次查看(过去 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!