Browsing the subsystem inside model using mscript

1 次查看(过去 30 天)
Im creating a GUI. Is it possible for me to browse the particular subsystem inside the model using mscripts.
Im able to browse the model using uigetfile. But is there any commands which can browse the particular subsystem using any functions.

采纳的回答

Benjamin Thompson
Benjamin Thompson 2022-10-10
You can use open_system to open a Simulink model to some subsystem inside the model. The second parameter to open_system should be 'window'.
  2 个评论
Aravind Sivanesan
Aravind Sivanesan 2022-10-10
open_system is working expected. But we need to manually give the subsystem level.
Is there any function like uigetfile , to get the subsystem from browser ?
Benjamin Thompson
Benjamin Thompson 2022-10-11
Yes you can do this with open_system also. Type "doc open_system" in MATLAB to get examples. Something like:
open_system('main_file/subsystem1/subsystem2', 'window');
The first argument is the full path down to the subsystem level. Note that this may not work if your subsystem is actually a reference model or in a library which is a different file.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programmatic Model Editing 的更多信息

产品


版本

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by