필터 지우기
필터 지우기

what is the script to get line handle by selecting line in a model

조회 수: 42 (최근 30일)
what is the script to get line handle by selecting line in a model

채택된 답변

Vishal Rane
Vishal Rane 2013년 6월 5일
Not aware of anything that gets you handle of a selected line. But
find_system(bdroot,'findall','on','Type','Line')
gives all line handles in the block diagram. You can add a specific path in place of bdroot.
  댓글 수: 2
Kaustubha Govind
Kaustubha Govind 2013년 6월 5일
More specifically, you can query the 'Selected' property of the line handle to find the one that is selected:
lh = find_system(bdroot,'FindAll','on','Type','Line');
get(lh, 'Selected')
Look for the entry corresponding to Selected=on.
venkateswarlu kaithepalli
venkateswarlu kaithepalli 2013년 6월 5일
Thank you very much Govind, your reply helped a lot thanks once again....

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

추가 답변 (1개)

Aseem Routray
Aseem Routray 2019년 12월 9일
Hello,
find_system(bdroot,'FindAll', 'on', 'type','line','selected','on')
This will get you the desired result.
Regards,
Aseem

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by