Conversion of Simulink .mdl or .slx model into XML

조회 수: 12 (최근 30일)
Rizwana
Rizwana 2016년 6월 9일
편집: Walter Roberson 2021년 4월 16일
I tried using :
sys = 'dummy.slx'
save_system(sys, 'exported_file_name.xml', 'ExportToXML', true)
But I keep getting the below error:
Error using save_system (line 38) Invalid Simulink object name: dummy.slx
Please if anyone can help me out to get an xml file out of .mdl or .slx simulink model.
  댓글 수: 1
Hoang Phi Pham
Hoang Phi Pham 2021년 4월 15일
Hello,
I have started with MDL file and XML file few days ago. I'm so confuse about how to convert MDL to XML for parse C# class. But when I read your thread, I think I have understood a little bit, thank you for this. Can I ask you that what programming languages that you have used? Because I have no idea to continue.
"sys = 'dummy.slx'
save_system(sys, 'exported_file_name.xml', 'ExportToXML', true)"
Thank you.

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2016년 6월 9일
Try
sys = 'dummy'
It is a system name, not a file name.
  댓글 수: 2
Rizwana
Rizwana 2016년 6월 9일
Thank you so much :)
Iris Iris
Iris Iris 2020년 2월 18일
I used this command and get the warning like this: the ‘ExportToXmL’option is no longer supported and will be removed in a future release. Could you help me,please? Thank you!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by