Upgrade Level-1 Data Classes
Simulink® no longer supports level-1 data classes. You must upgrade data classes that you created using the level-1 data class infrastructure, which was removed in a previous release.
Run the following utility function while specifying the destination folder for the upgraded classes.
Property types defined in level-1 data classes that are not subclasses of
Simulink.CustomStorageClassAttributes are not preserved
during an upgrade. Only subclasses of these three classes will preserve attributes
This command upgrades all your level-1 data class packages. You cannot upgrade selected data packages.Here,
C:\MyDataClassesis the destination folder for your level-2 data classes.
Do not place your upgraded level-2 classes and their equivalent level-1 classes in the same folder.
packagedefn.matfile in your level-1 class packages for the upgrade and creates level-2 classes in the specified destination folder. Then,
Simulink.data.upgradeClassesadds the folder to top of the MATLAB® path and saves the path.
Simulink.data.upgradeClassescannot save the MATLAB path because of restricted access, a warning appears. In this case, manually add the folder to the top of the MATLAB path and save the path using
You can change the location of the level-2 package folders after they have been generated. However, you will need to update your MATLAB path so that MATLAB can find these package folders.
Resave MAT-files and models that contain level-1 data objects.
Retain your level-1 classes on the MATLAB path until you have resaved all of your models and MAT-files that contain level-1 data objects. Any models or MAT-files that contain level-1 data objects will continue to load successfully while your level-1 data classes are on the MATLAB path.
You cannot use both level-1 and level-2 data classes at the same time. Level-2 classes need to be above the level-1 classes on the MATLAB path so that they are found by MATLAB.