is it possible to reference a port name instead of number for add_line()?
5 次查看(过去 30 天)
显示 更早的评论
The function add_line(), as far as I can tell, requires the use of a port number as part of the origin and destination arguments. If you remove a port from a Simulink model, Simulink automatically renumbers the ports.
This can be a maintenance problem if one were to script the interconnections in a Simulink system, and then need to alter a sub-system.
Is there any way to get add_line() to work with a port name instead of port number?
0 个评论
回答(1 个)
Monika Jaskolka
2021-6-24
No, this is not possible. The function add_line can currently only be used by providing the port handles or points.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Programmatic Model Editing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!