A 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.
The following example shows how to use project checks to fix your project after manually saving a model as SLX.
Open a new copy of the
In the project Files view, right-click the model file
AnalogControl.mdl, and select
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, change the view from Project
number of files) to
All. 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 Project tab, click Run Checks 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
models folder 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 for removal.
On the Project tab, in the Source Control section, click
Commit. Enter a comment for your submission in the dialog box,
Convert to SLX, and click
In the Files view, select the All view. Check that the backup
file, for example,
AnalogControl.mdl.r2018b is still present, along
with the new SLX file. Click the Actions button to customize the columns to show, such as Date
In the Files view, select 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
AnalogControl.slx and select
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 Project.
For an example showing how to programmatically upgrade a whole project using
upgradeadvisor, see instead: