Close all messageboxes (generated by Simulink)

10 ビュー (過去 30 日間)
Ilya
Ilya 2015 年 4 月 5 日
回答済み: ashish ahir 2015 年 4 月 8 日
I'd like to know how to close all messageboxes that Simulink occasionally creates (in my case these are unimportant warnings after machine initialization command in SimPowerSystems, but this could be something else). There were some answers on how to close a messagebox (e.g. like this one), but they all assume that the messagebox handle is known, which is something that people may have when they create messageboxes themselves. My messageboxes are, however, generated by Simulink.

採用された回答

TAB
TAB 2015 年 4 月 6 日
If title of the message box is same each time they are generated, then you can search the existing open figures by their name and close them.
MsgBoxH = findall(0,'Type','figure','Name','TitleOfMsgBox');
close(MsgBoxH);
  1 件のコメント
Ilya
Ilya 2015 年 4 月 8 日
Good, this works!

サインインしてコメントする。

その他の回答 (1 件)

ashish ahir
ashish ahir 2015 年 4 月 8 日
can you please attach screenshot of that messagebox screen?

カテゴリ

Help Center および File ExchangeSimscape Electrical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by