Filter löschen
Filter löschen

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

42 Ansichten (letzte 30 Tage)
what is the script to get line handle by selecting line in a model

Akzeptierte Antwort

Vishal Rane
Vishal Rane am 5 Jun. 2013
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 Kommentare
Kaustubha Govind
Kaustubha Govind am 5 Jun. 2013
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 am 5 Jun. 2013
Thank you very much Govind, your reply helped a lot thanks once again....

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

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

Kategorien

Mehr zu Programmatic Model Editing finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by