Page 1 of 1

Unrecognized function or variable 'ExternalLoads'

Posted: Thu Feb 09, 2023 8:46 am
by smagdziarz
Hi everyone. I have been using Matlab API with OpenSim for quite some time now, and all of a sudden, the GUI script I have in Matlab is throwing error after error when I try to create an External Loads file. I am also having the same issue with running RRA and SO. Here are the errors I am getting when trying to run each of these:

External Loads
Unrecognized function or variable 'ExternalLoads'.

Error in DEAGui>createGRF_XMLfile_Callback (line 1389)
extLoads = ExternalLoads(externalLoadsFile, true);

Error in gui_mainfcn (line 95)
feval(varargin{:});

Error in DEAGui (line 42)
gui_mainfcn(gui_State, varargin{:});

Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)DEAGui('createGRF_XMLfile_Callback',hObject,eventdata,guidata(hObject))

Error while evaluating UIControl Callback.


RRA/SO
Unable to resolve the name 'ModelVisualizer.addDirToGeometrySearchPaths'.

Error in DEAGui>runOpenSimRRA_Callback (line 871)
ModelVisualizer.addDirToGeometrySearchPaths(path);

Error in gui_mainfcn (line 95)
feval(varargin{:});

Error in DEAGui (line 42)
gui_mainfcn(gui_State, varargin{:});

Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)DEAGui('runOpenSimRRA_Callback',hObject,eventdata,guidata(hObject))

Error while evaluating UIControl Callback.


Again, I haven't had these issues in the past, and nothing was changed in the code to cause a major issue like this, so I am unsure how to proceed. Any help would be very, very appreciated!

Re: Unrecognized function or variable 'ExternalLoads'

Posted: Thu Feb 09, 2023 2:29 pm
by nbianco
Hi Sara,

Have you updated the OpenSim or Matlab version recently? Even if you haven't updated them, what version of OpenSim and Matlab are you using?

That type of error usually occurs if you forget to call "import org.opensim.modeling.*" somewhere, so you could double check that too.

It strange that this would just suddenly stop working.

-Nick