Search code examples
xmlsimulink

Manipulating slx files - error : "A part name shall not have a forward slash as the last character [M1.5]"


I am playing around a bit with the slx format and I came a cross an error that startled me a bit.

I have a file junk.slx that contains everything a basic slx file does which is a bunch of xml files and a png file. When copying junk.slx and in the new file replace one of the xml files with the same file from the original file I get the following error messege when trying to open the slx file again:

"File 'Copy_of_junk.slx' does not contain a valid Simulink model in SLX format: A part name shall not have a forward slash as the last character [M1.5]"

I wonder why this is? I can copy/paste the content of the xml file from junk.slx into the version in Copy_of_junk.slx and this does not give any error.

(I change the file extension to zip to be able to alter the content, slx has the structure of an OPC file: http://en.wikipedia.org/wiki/Open_Packaging_Conventions#File_formats_using_the_OPC if this is information you need to help me.)

EDIT:

I don't know if anyone will attempt to answer this question but I figure I try to give some more information about this mystery. I have made comparisson with Matlab compare tool (zip files) and the only difference in the files are "Last Modifiede Date" which in the working file all content have the same values. In the not working file there are a few minutes difference. Could this be an issue?


Solution

  • I managed to find an answer so I figured I'd share it, if for some reason someone would be trying to tackle a similar problem.

    http://www.mathworks.se/matlabcentral/answers/158116-error-a-part-name-shall-not-have-a-forward-slash-as-a-last-character-m1-5