How do I refresh "Model" blocks programmatically?

17 ビュー (過去 30 日間)
MathWorks Support Team
MathWorks Support Team 2009 年 6 月 27 日
編集済み: MathWorks Support Team 2023 年 7 月 5 日
I have a Simulink model with many "Model" blocks. I have to frequently refresh each of these blocks by right-clicking on the block, hovering over "Subsystem & Model Reference", and then clicking on "Refresh Selected Model Block". Is there a way I can update "Model" blocks programmatically?

採用された回答

MathWorks Support Team
MathWorks Support Team 2023 年 7 月 5 日
編集済み: MathWorks Support Team 2023 年 7 月 5 日
MATLAB R2020a and later:
You can use the "Simulink.ModelReference.refresh" function to update a specified "Model" block. Please refer to the following documentation page for more information:
MATLAB R2019b and earlier:
You can save the referenced model by using the "save_system" function. Please refer to the following documentation page for more information:

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by