Azzera filtri
Azzera filtri

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

3 visualizzazioni (ultimi 30 giorni)
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 .

Risposta accettata

Fangjun Jiang
Fangjun Jiang il 8 Dic 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.

Più risposte (0)

Categorie

Scopri di più su Programmatic Model Editing in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by