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

50 次查看(过去 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.

请先登录,再进行评论。

更多回答(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