Azzera filtri
Azzera filtri

How to get the selected Simulink or Stateflow element?

3 visualizzazioni (ultimi 30 giorni)
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?

Risposte (1)

Ankitha Kollegal Arjun
Ankitha Kollegal Arjun il 19 Apr 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.

Categorie

Scopri di più su Simulink Functions in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by