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
0 个评论
采纳的回答
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
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
2019-12-9
Hello,
find_system(bdroot,'FindAll', 'on', 'type','line','selected','on')
This will get you the desired result.
Regards,
Aseem
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!