Get selected objects (simulink)
조회 수: 42 (최근 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에서 Simulink Functions에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!