How do I refresh "Model" blocks programmatically?
29 次查看(过去 30 天)
显示 更早的评论
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
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!