- use find_mdlrefs() to get a list of all referenced models
- For each model, use find_system() to get a list of inports and outports
- For each inport and each outport, use set_param() to set 'BusOutputAsStruct' to true
Programatically set Inport/Outport Blocks as "Output as nonvirtual bus"
9 次查看(过去 30 天)
显示 更早的评论
We have a hiarchy of models with busses going across model boundries. We need to have all these inports and outports set as nonvirtual bus. If we don't bad things seem to happen with the code. With new programmers coming on we find these check boxes rarely get set. I am looking for a way to either Default the checkbox "Output as nonvirtual bus" to "yes" or programatically interrigate the entire model hiarchy to find all inport and outport and set the check box.
0 个评论
回答(1 个)
Mark McBroom
2021-12-23
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!