Check that point doesnt lay on line in Simulink block diagram
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello!
I want to connect some block programatically. The simplest way for that is to add_line by points but when i add line by that way i encounter problem when points lay on existing line. In that situation two different lines are linked. Is there any way to check point to laying on existing line?
댓글 수: 4
Fangjun Jiang
2020년 11월 22일
If you need to connect from a to b and a to c, can't you run add_line(a,b) and add_line(a,c) to achieve it?
채택된 답변
Fangjun Jiang
2020년 11월 23일
Checking whether a point lays on any existing line will be very difficult. The answer to the OP's question seems to be utilizing add_line() in a different way. Rather than specifying multiple points in one add_line() to achieve connecting multiple ports, calling add_line(SourcePort, DestinationPort) multiple times seems to meet the need.
댓글 수: 5
추가 답변 (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!