Stateflow | ![]() ![]() |
Using the Replace Buttons
You can activate the replace buttons (Replace, Replace All, Replace All in This Object) only after a search that finds text.
Replace
When you select the Replace button, the current instance of text matching the text string in the Search for field is replaced by the text string entered in the Replace with field. The Search & Replace tool then automatically searches for the next occurrence of the Search for text string.
Replace All
When you select the Replace All button, all instances of text matching the Search for field are replaced by the text string entered in the Replace with field. Replacement starts at the point of invocation to the end of the current Stateflow chart. This means that if you initially skip through some search matches with the Search button, they are also skipped when you select the Replace All button.
If the search scope is set to Search Whole Machine, then after finishing the current Stateflow chart, replacement continues to the completion of all remaining charts in your Simulink model.
Replace All in This Object
When you select the Replace All in This Object button, all instances of text matching the Search for field are replaced by text entered in the Replace with field everywhere in the current Stateflow object regardless of previous searches.
![]() | Specifying the Replacement Text | Search and Replace Messages | ![]() |