I am receiving an error: 'Error using smimport_implementation' when using the 'smimport' function to import a CAD model into Simscape Multibody. I have copied the command window readout below.
Error using smimport_implementationWorkspace for block diagram 'sm_robot' was not loaded because an error occurred while loading the MATLAB-file 'C:\ProgramFiles\MATLAB\R2018b\bin\win64\sm_robot_DataFile.m'.Error in smimport (line 167) [varargout{1:nargout}] = smimport_implementation(multibodyDescriptionFile, varargin{:});Caused by: Error using smimport_implementation Undefined function or variable 'sm_robot_DataFile'.
I have seen the previous answer to a similar question in 2017, but the issue that caused the error has been fixed in the release I am using: R2018b. The line in the function smimport is also line 167 not 132 as in the older question. This error is even happening with the demo XML file: sm_robot. I have checked that the data file has been generated and I can open it and view it.
How can I rectify this error so that the multibody block diagram builds without errors?
Best Answer