Documentation Center

  • Trial Software
  • Product Updates

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.

    Note:   Property types defined in level-1 data classes that are not subclasses of Simulink.Parameter, Simulink.Signal, or Simulink.CustomStorageClassAttributes are not preserved during an upgrade. Only subclasses of these three classes will preserve attributes PropertyType and AllowedValues.

  1. This command upgrades all your level-1 data class packages. You cannot upgrade selected data packages.

    Simulink.data.upgradeClasses('C:\MyDataClasses')

    Here, C:\MyDataClasses is the destination folder for your level-2 data classes.

      Note:   Do not place your upgraded level-2 classes and their equivalent level-1 classes in the same folder.

    Simulink.data.upgradeClasses uses the packagedefn.mat file in your level-1 class packages for the upgrade and creates level-2 classes in the specified destination folder. Then, Simulink.data.upgradeClasses adds the folder to top of the MATLAB® path and saves the path.

      Note:   If Simulink.data.upgradeClasses cannot 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 savepath.

  2. 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.

  3. Resave MAT-files and models that contain level-1 data objects.

  4. 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.

      Note:   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.

Was this topic helpful?