How to get the selected Simulink or Stateflow element?

3 Ansichten (letzte 30 Tage)
Markus
Markus am 14 Apr. 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?

Antworten (1)

Ankitha Kollegal Arjun
Ankitha Kollegal Arjun am 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.

Kategorien

Mehr zu Simulink Functions finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by