Hi all, I would like to write a script which helps me to identify stateflow blocks in my models where certain settings were made (e.g. find all stateflow charts where 'User secified states/transition execution order' is set to ON). I would like to use this script to proof for a review that certain settings were not used in my model etc.
I tried to do it with the find_system() command. But I don't know what parameter to use in this function to identifiy stateflow charts.
It would be easy to identify all gain blocks in my model - the correct command to show all locations would be: find_system(gcs, 'BlockType', 'Gain')
However I saw that this does not work that easy for searching stateflow blocks. If I click on a stateflow chart and do a get_param(gcb, 'BlockType') the return is 'SubSystem' - so it seems that there is no unique Blocktype for stateflow charts, it is only treated as subsystem.
The next step after detection of all statefow charts would be to identify those where parameter 'User specified states/transition execution order' was set to ON. I also don't know how to do that.
Does anybody know how to do that , or is there another solution ?
--- Is there maybe a global switch where 'User secified states/transition execution order' can be switched ON/OFF for the whole model. A compare of the generated code with/without that switch could identify where the setting is used and where it takes effect.
Thanks for your help, Rolf
No products are associated with this question.
Try the Stateflow API
You should be able to find any/all charts in a model with this API and get/set its properties.