Get selected objects (simulink)
32 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Adrian
el 12 de Nov. de 2014
Comentada: Joe Rustan
el 3 de Nov. de 2022
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 comentarios
Respuesta aceptada
Orion
el 12 de Nov. de 2014
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')
Más respuestas (1)
Gaganjyoti Baishya
el 21 de Jun. de 2020
To get an array of all selcted blocks use find_system(bdroot, 'Selected', 'on');
1 comentario
Joe Rustan
el 3 de Nov. de 2022
Is there a way to get just the currently selected signal line coming from/to a block? Thanks.
Ver también
Categorías
Más información sobre Simulink Functions en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!