1

I'm using the Stateflow API's view method to select/highlight elements in a Stateflow chart, but I want to clear the highlight afterward. I know I can get a handle to the Stateflow object and call the view method on it to highlight it:

theObject = find(sfroot, 'Id', <id number>);
theObject.view;

...but since view takes no arguments and is called on an object's handle, I'm not sure how to set the selection to "nothing" after I'm done. What is the recommended way to clear the highlight afterward?

rob
  • 6,147
  • 2
  • 37
  • 56

1 Answers1

1
theObject.view;

is used to fit the object to the screen. To highlight an object, I suggest you use the method:

theObject.highlight;

to disable the highlight, try:

sf('Highlight', <chartId>, []);

where chartId is the numeric ID of the chart object.