Main Content

highlight

Highlight graphical object

Description

example

highlight(graphicalObject) highlights a graphical object in the Stateflow® Editor.

Examples

collapse all

Open a Simulink® model called myModel. Suppose that the model contains a Stateflow chart with a state named A.

open_system('myModel')

Access the Simulink.Root object at the top level of the Stateflow hierarchy.

rt = sfroot;

Find the state named A.

st = find(rt,'-isa','Stateflow.State','Name','A');

Highlight the state in the Stateflow Editor.

highlight(st);

Input Arguments

collapse all

Tips

To clear the highlighting, use the hilite_system (Simulink) function. For example, to clear the highlighting in chart ch, enter:

hilite_system(ch.Path,'none')

Alternatively, you can use the Stateflow Editor. In the Debug tab, under Animation, click the Remove animation highlighting button .

Introduced in R2012a