is it possible to reference a port name instead of number for add_line()?
조회 수: 3 (최근 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!