How to get the selected Simulink or Stateflow element?

조회 수: 3 (최근 30일)
Markus
Markus 2017년 4월 14일
답변: Ankitha Kollegal Arjun 2017년 4월 19일
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?

답변 (1개)

Ankitha Kollegal Arjun
Ankitha Kollegal Arjun 2017년 4월 19일
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.

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by