Centering all subsystems inside a simulink model
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hello,
my goal is to center all views inside every subsystem (including masked and linked subsystems) inside a large simulink model.
I found this answer from 2019: Answers/438327 from the MathWorks Support Team, however this does not seem to work that well because:
- It takes extremely long, due to opening each and every subsystem inside my model
- Its not consistent: Not every block's ZoomFactor gets set to 100%.
- After assigning a ZoomFactor of 100% to a block, some ZoomFactors get reset after opening a block inside simulink
Is there a better way of centering every subsystem now?
0 Commenti
Risposte (2)
Harshal Ritwik
il 13 Giu 2023
Hi,
As per my understanding of your question you want to know how we can use display the subsystems with 100 percent zoom and centre them.
You can use the spacebar when you need to centre the subsystem and maximize its zoom factor. You can press the spacebar once you have opened the model.
I hope it helps!
Thanks.
Milan Bansal
il 1 Set 2023
Hi,
I understand that you need to display your whole model as well as all the subsystems inside it at the centre and with 100% zoom.
Try to run the code given below. It will recenter the model and all its subsytems and fit them to screen.
load_system('model_name')
Sys = find_system("model_name")
set_param( Sys{1}, 'ZoomFactor', 'FitSystem' ); % recenter and fit the model to screen
subSystems = find_system("randomTest",'BlockType', 'SubSystem'); % list of all the subsystems present in the model
for ind=1:length(subSystems)
set_param( subSystems{ind}, 'ZoomFactor', 'FitSystem' ); % recenter and fit the subsystem to screen
end
Refer to the link below to know more about "find_system" command.
0 Commenti
Vedere anche
Categorie
Scopri di più su Subsystems in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!