Turn off text to screen during API calls to Inverse Dynamics
Posted: Mon Dec 26, 2016 7:53 am
I am trying to suppress all text output to the screen when running ID from the Matlab API. I have tried using the getVerboseLevel/setVerboseLevel methods as in the following code, but it does not work. Can anyone help identify what I might be doing wrong? --Thanks, Bill
%API calls to run ID from Matlab
import org.opensim.modeling.*
idTool = InverseDynamicsTool(IDSetup_File);
IDModel = Model(Model_File);
IDModel.initSystem();
%only process 1 frame of data each iteration for efficiency
idTool.setStartTime(CurrTime);
idTool.setEndTime(CurrTime);
%Suppress output text to screen during ID
vLevel=idTool.getVerboseLevel();
vLevel.swigToEnum(0);
idTool.setVerboseLevel(vLevel);
idTool.run();
%API calls to run ID from Matlab
import org.opensim.modeling.*
idTool = InverseDynamicsTool(IDSetup_File);
IDModel = Model(Model_File);
IDModel.initSystem();
%only process 1 frame of data each iteration for efficiency
idTool.setStartTime(CurrTime);
idTool.setEndTime(CurrTime);
%Suppress output text to screen during ID
vLevel=idTool.getVerboseLevel();
vLevel.swigToEnum(0);
idTool.setVerboseLevel(vLevel);
idTool.run();