필터 지우기
필터 지우기

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

조회 수: 3 (최근 30일)
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 CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by