- save model included stateflow chart.
- unzip the model.
- show stateflow.xml.
How to export Simulink models (with Stateflow components) to XML ?
19 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I would need to know how can I export Simulink models (and some of these latter may also have Stateflow components, such as State Charts etc.) to XML.
I have typed the following MATLAB commands:
modelName = 'sf_aircraft' % model of the name without extension
save_system(modelName, 'xml_model.xml', 'ExportToXML', true)
But I have the following warning :
Warning: The 'ExportToXML' option is no longer supported and will be removed in a future release.
And I have also noticed that in the XML file the State Chart component is just mentioned, so basically I cannot see what it contains from the XML file.
So what I would like to ask is if there are other functions or ways that allow Simulink models with State Charts components to be exported in a XML format.
Thanks in advance.
1 comentario
stozaki
el 22 de En. de 2020
Respuestas (1)
Corey Lagunowich
el 11 de Feb. de 2026 a las 20:54
Editada: Corey Lagunowich
el 11 de Feb. de 2026 a las 20:54
Stateflow's model format is readable, but not open. You should not need to directly read or write SLX model files, as this format may change without prior notice.
What are you trying to achieve?
- If you want to modify your Simulink or Stateflow models, please use the Simulink and Stateflow APIs as referred in the documentation.
- If you're looking to improve compatibility and interoperability with git, register the SLX format following this doc page. You can use Simulink's diff and merge tools to understand what has changed between two different designs.
0 comentarios
Ver también
Categorías
Más información sobre Simulink Functions en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!