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

45 ビュー (過去 30 日間)
venkateswarlu kaithepalli
venkateswarlu kaithepalli 2013 年 6 月 5 日
回答済み: Aseem Routray 2019 年 12 月 9 日
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 Center および File ExchangeProgrammatic Model Editing についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by