Get selected objects (simulink)
63 ビュー (過去 30 日間)
古いコメントを表示
Hi, when I want to run a script on a selected simulink object, I use "gca" to get its handle. If I select many objects, "gca" return only the last selected. Ho can I get handles of ALL selected objects?
Thanks Adriano
0 件のコメント
採用された回答
Orion
2014 年 11 月 12 日
Hi,
gca won't return the selected object, but the current axe in a figure (get current axe)
I guess you meant gcb (get current block).
gcb only return one block.
if you want multiple blocks :
MyBlocks = find_system(gcs,'Selected','on')
その他の回答 (1 件)
Gaganjyoti Baishya
2020 年 6 月 21 日
To get an array of all selcted blocks use find_system(bdroot, 'Selected', 'on');
1 件のコメント
Joe Rustan
2022 年 11 月 3 日
Is there a way to get just the currently selected signal line coming from/to a block? Thanks.
参考
カテゴリ
Help Center および File Exchange で Model, Block, and Port Callbacks についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!