Simulink® Project helps you upgrade model files from MDL format to SLX format. You can use the project integrity checks to automatically add the new SLX file to your project, remove the MDL file from the project, and preserve the revision history of your MDL file with the new SLX file. You can then commit your changes to source control and maintain the continuity of your model file history.
Open a new copy of the
In the Project Files View, right-click the model file
and select Open.
Select File > Save As.
Ensure that Save as type is SLX, and click Save. SLX is the default unless you change your preferences.
To see the results, in the Files view, click the Project
Files View button and change the selection to the All
Files View. Expand the
Simulink saves the model in SLX format, and creates a backup
file by renaming the MDL file to
The project also reports the original name of the MDL file as missing.
To resolve these issues, on the Simulink Project tab, click Check Project to run the project integrity checks. The checks look for MDL files converted to SLX, and offer automatic fixes if that check fails.
Click the Fix button to view recommended actions and decide whether to make the changes.
When you click Fix, the Missing Files dialog box offers to remove the missing MDL file from the project and add the new SLX file to the project.
Click Yes to perform the fix.
Project checks rerun after you click Yes to perform the fix.
Close the Project Integrity Checks dialog box.
Select the Modified Files view. Expand the
and check the Modifications column to see that the newly created SLX
file has been added to the project, and the original MDL file is scheduled
Click Commit Modified Files.
Enter a comment for your submission in the dialog box, for example,
Convert to SLX, and click Submit.
In the Files view, ensure the All Files
View is selected. Check that the backup file
still present, along with the new SLX file. Click the Actions button
to customize the columns to show,
such as Date Modified.
In the Files view, click the All Files View button and change the selection to the Project Files View. Check that only the new SLX file is included in the project, and the backup file is not included in the project.
Right-click the model file
select Show Revisions.
In the File Revisions dialog box, verify that the
previous revision is
AnalogControl.mdl. The revision
history of the previous model file is preserved with the new SLX file.
For an example showing commands to find and upgrade all model files in the project to SLX, see Converting from MDL to SLX Model File Format in a Simulink Project.