It does not seem possible to disable the warning. If you will be using C as the action language throughout the whole model, it looks safer and easier to me to first set the correct action language before adding a new Stateflow chart. I understand that you would like to avoid changing default action language on other people's machine, but a possible workaround could be:
- Save their current default setting
- Change the Stateflow action language to "C"
- Restore the previous default language at the end of the script
The code that does the job should look like:
curLanguage = sfpref('ActionLanguage');
sfpref('ActionLanguage','C');
sfpref('ActionLanguage', curLanguage)
Best Answer