How to get the selected Simulink or Stateflow element?

3 vues (au cours des 30 derniers jours)
Markus
Markus le 14 Avr 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?

Réponses (1)

Ankitha Kollegal Arjun
Ankitha Kollegal Arjun le 19 Avr 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.

Catégories

En savoir plus sur Simulink Functions dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by