How to ensure all of our models and subsystems are centered on the screen and are at 100% zoom?

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.

ANSWER

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

SEE COMPLETE ANSWER CLICK THE LINK

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.