Error while deleting a line in Simulink

Hello, I am a beginner to Simulink! I am trying to add and delete lines on a simulink model. I am using the following two commands "add_line('Using_Common_Nodes','Resistor1/LConn1','Resistor3/LConn1')" and "delete_line('Using_Common_Nodes','Resistor2/RConn1','Resistor3/RConn1')". add_line command works fine but while using the delete command, the following error comes up "Invalid line specifier". The error appears whenever I try to delete a line that is connected to a node. Please help.

답변 (1개)

David Barry
David Barry 2013년 5월 20일

0 개 추천

Command line interaction like this is not really a beginner thing. Silly question, but I assume you know you can just press the delete button on the keyboard with signal line selected?

댓글 수: 2

Mayur
Mayur 2013년 5월 20일
I am working on an application that requires me to interface the Matlab GUI with Simulink. So essentially, i need to use command line arguments to delete the line. My application has the GUI as the front end with a simulink model running in the background.
David Barry
David Barry 2013년 5월 20일
Well your API calls are of the correct format so you must have a block name or port mismatch. I suggest you start by trying the delete_line command for the same set of blocks that you successfully connected with the add_line command just to give yourself confidence. After that you will need to check names. It's hard to say more without seeing your model.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터 및 File Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

제품

태그

질문:

2013년 5월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by