MATLAB: Does the “Simulink.​data.upgra​deClasses” function not upgrade the Level-1 data classes that I have when using Simulink 8.2 (R2013b)

simulink

I have a Level-1 data class and need to upgrade to a Level-2 data class for my version of MATLAB. I am following the following documentation:
https://www.mathworks.com/help/simulink/ug/upgrading-level-1-data-classes-to-level-2.html
I get a message saying that all Level-1 data classes are upgraded after running the following command:
>> Simulink.data.upgradeClasses('C:\MyDataClasses')
However, my data class is still Level-1. I can see the level-1 data class in the "cscdesigner", so why does this command not recognized my class and why does the "Simulink.data.upgradeClasses" function not upgrade the Level-1 data classes that I have?

Best Answer

If the level-1 data class has been loaded by a model, the upgrade function will not have access to the Level-1 data class to upgrade it.
You can check if the class has been loaded by inspecting the Custom Storage Class Designer by entering the following command at the MATLAB Prompt.
   >> cscdesigner
If the level-1 package appears here in the "Select Package" drop-down list, you will not be able to upgrade as the package has been loaded into the MATLAB environment.
To resolve this issue:
 
1) Move the data class to a new folder.
2) Restart MATLAB to ensure no data classes are loaded. 
3) Execute the following command at the MATLAB Prompt to upgrade all your level-1 data class packages.
  >> Simulink.data.upgradeClasses. ('C:\MyDataClasses') 
4) Move the level-2 data class to the necessary folder and delete (or remove) the old level-1 data class.