MATLAB: How to resolve the error “Variable ‘smiData’ has been deleted from model workspace.” when trying to open older Simscape models

Simscape Multibodysmidata

For my work, I take Solidworks Assemblies and import them into Simscape Multibody to run simulations. When I’m done with the models, I upload them to my company’s server.
 
Occasionally, I need to pull the model from the server to run the simulations again. Several times, when I open a model that I pulled from the server, an error will occur. Many of the joints will be highlighted red
An error:
"Variable 'smiData' has been deleted from model workspace."
is generated.
How do I resolve this?

Best Answer

Whenever you import a CAD file, a data file is created that has the variable "smidata".
By default a data file is created when importing. The user defines this parameter. The user will have to upload this file and carry it along with the model file.
Refer to the "ImportMode" section of the "smimport" function using the link below