Does not Contain a Valid Simulink Model in SLX Format

조회 수: 153 (최근 30일)
jarez95
jarez95 2018년 1월 18일
댓글: Taku Zero 2024년 11월 19일 12:19
I started up MATLAB today and opened Simulink and noticed that my simulink model was not in the recent file list. I then went to the location of my Simulink project and attempted to open the SLX file manually, it threw an error like the one attached below: "Does not contain a valid simulink model in SLX format".
I had a look online but it seems to a few people had this issue, I then attempted to carry out the following solutions as the posts stated.
1) I copied and pasted the whole project to my C Drive and tried to run from there, same error - therefore not a path issue.
2) I tried to see if MATLAB could read this file with Fopen, this returned -1 indicating it could not be read. I then copied the folder and went to another computer and tried to open it, exact same story and same error.
3) I tried recovering the files from the Recycle Bin, but no luck - the only versions available were after or at the time of the error.
4) I changed the extension to .zip format and attempted to open/extract/repair also no luck.
5) I tried a third party simulink viewer (Diffplug) also no luck.
6) I ran a system check on the hard drive and that also found no errors, it must have been an issue with the way MATLAB closed down or something - either way it is corrupted and I need the model back badly :(
edit: I am running R2017B - Simulink: 9.0
Any help or guidance would be much appreciated!
  댓글 수: 1
zhongliang hou
zhongliang hou 2022년 9월 22일
发生背景:保存该文件时蓝屏,再打开时,提示该问题,不是slx文件 解决方案:在该文件的路径下,存在filename.slx.bak文件,将其重命名为filename.slx即可,再打开时不存在此问题

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

답변 (7개)

sadanand Chandane
sadanand Chandane 2019년 11월 21일
We encountered with same issue while downgrading model from 2019A to 2015B. We did some work around as mentioned below.
  1. converted slx of 2019A into mdl of 2015B. (2019A slx -> 2015B mdl)
  2. Ensured the working (Only simulation) of 2015B mdl file in MATLAB 2015B.
  3. Saved 2015B mdl file as slx file, and ensured the working of slx file in MATLAB 2015B. (2015B mdl -> 2015B slx)
It worked for us since the model complexity was moderate.
This is fine for us, Since we won't be using 2015B for code generation.
For our knowledge, Please let us know, if anyone encounters the additional issue after following above step.
Regards.

yakout khadouj jelbaoui
yakout khadouj jelbaoui 2018년 12월 8일
hello ser,
could you help us please if you find the solution I would be very appreciated.

ANT R
ANT R 2019년 4월 16일
hi man,have you solve the problem"Does not contain a valid simulink model in SLX format".?
I also encountered the same problem~_~

Azam Bagheri
Azam Bagheri 2019년 6월 5일
편집: Azam Bagheri 2019년 6월 5일
Hello all,
I'm working with MATLAB R2019a and I have the same problem as well!
please reply this comment anyone who has found the solution :)!
Thanks

Di Wu
Di Wu 2020년 4월 17일
If the model is encrypted ?

Saeed Almaha
Saeed Almaha 2021년 4월 27일
Hello,
I'm trying on opening a simulink model. (*.slx file) However, when I double click on the file, it keeps saying "File '.....' does not contain a valid Simulink model in SLX format : Could not open source package". I tried excecuting exactly the same file on other PC, it desen't worked.
could any one help me??

nandhini b
nandhini b 2021년 5월 16일
I too have this problem today. It seems my MATLAB files were corrupted, so I have uninstalled the antivirus and restarted my pc.Now, launch the MATLAB and open the files, you will be able to...Hope it helps..

카테고리

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