Does not Contain a Valid Simulink Model in SLX Format

153 visualizaciones (últimos 30 días)
jarez95
jarez95 el 18 de En. de 2018
Comentada: Taku Zero el 19 de Nov. de 2024 a las 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 comentario
zhongliang hou
zhongliang hou el 22 de Sept. de 2022
发生背景:保存该文件时蓝屏,再打开时,提示该问题,不是slx文件 解决方案:在该文件的路径下,存在filename.slx.bak文件,将其重命名为filename.slx即可,再打开时不存在此问题

Iniciar sesión para comentar.

Respuestas (7)

sadanand Chandane
sadanand Chandane el 21 de Nov. de 2019
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 el 8 de Dic. de 2018
hello ser,
could you help us please if you find the solution I would be very appreciated.

ANT R
ANT R el 16 de Abr. de 2019
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 el 5 de Jun. de 2019
Editada: Azam Bagheri el 5 de Jun. de 2019
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 el 17 de Abr. de 2020
If the model is encrypted ?

Saeed Almaha
Saeed Almaha el 27 de Abr. de 2021
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 el 16 de Mayo de 2021
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..

Categorías

Más información sobre Programmatic Model Editing 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!

Translated by