|On this page…|
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 airframe project.
In the Project Files view, right-click the model file AnalogControl.mdl, 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.
Select the All Files view to see the results. Expand the models folder.
Simulink saves the model in SLX format, and creates a backup file by renaming the MDL file to AnalogControl.mdl.releasename. The project also reports the original name of the MDL file as missing.
To resolve these issues, click Check Project on the toolstrip 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.
Click Commit Modified Files. Enter a comment for your submission in the dialog, for example, Convert to SLX, and click Submit.
In the All Files view, check that the backup file AnalogControl.mdl.r2012b is still present, along with the new SLX file. Click the Actions button to customize the columns to show, such as Date Modified.
In 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 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.