フィルターのクリア

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

3 ビュー (過去 30 日間)
Sameer Kumthekar
Sameer Kumthekar 2011 年 12 月 8 日
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 .

採用された回答

Fangjun Jiang
Fangjun Jiang 2011 年 12 月 8 日
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.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgrammatic Model Editing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by