How to close all windows except top level window of a model?

4 vues (au cours des 30 derniers jours)
Sameer Kumthekar
Sameer Kumthekar le 8 Déc 2011
Hi,
I want to close all open windows except the top level window of a model. Model is opened using open_system command. e.g. I am opening say model name open_system('xyz') then it opens with three windows open lik xyz\abc, xyz\abc\pqr, xyz\lmn ,along with xyz , the top level window. Now I want to close all these three windows & want to keep open only xyz which is top level window. also before closing I want to save it so that next time when I will open the model xyz, it will open with only xyz open & not any other window open. I tried using bdclose , close_ system it did not work.
Please suggest the solution. Expecting reply, Thanks in advance !!
Sameer .

Réponse acceptée

Fangjun Jiang
Fangjun Jiang le 8 Déc 2011
You can do this:
b=find_system(ModelName,'blocktype','SubSystem');
close_system(b);
This will only close those opened model windows and won't save the model. You can then save the model and next time you open the model, it will only show the root level window.
Another suggestion is to use the model browser window to browser your model, instead of double clicking every subsystem block to open it.

Plus de réponses (0)

Catégories

En savoir plus sur Schedule Model Components dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by