How to get the selected Simulink or Stateflow element?

3 visualizaciones (últimos 30 días)
Markus
Markus el 14 de Abr. de 2017
Respondida: Ankitha Kollegal Arjun el 19 de Abr. de 2017
With gcb and sfgco, APIs exist to either get the currently selected block or stateflow object. However, both functions work independently. When you are in Stateflow, gcb holds the last block selected until you return to Simulink. Similarly, when you are in Simulink, sfgco holds the last Stateflow object previously selected.
How can I get the last element (no matter if it is in Simulink or Stateflow), which the user selected?

Respuestas (1)

Ankitha Kollegal Arjun
Ankitha Kollegal Arjun el 19 de Abr. de 2017
There is no direct method to access the Stateflow objects inside a Simulink model, apart from using the Stateflow APIs. Similarly, Simulink objects have to be accessed using the Simulink APIs. There are no generic APIs, common for both Simulink and Stateflow objects.

Categorías

Más información sobre Simulink Functions en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by