Does anyone know how to define the body for which the joint reaction loads are calculated via Matlab (child or parent)? I am trying to use the PropertyHelper but cannot see to access or define what I think is a String Array (apply_on_bodies). When I treat the value as a string value and try to set it to 'parent' (as shown in the code), Matlab crashes. I tried using PropertyHelper.setValueStringArray(x2,['parent']) but was unsuccessful as well.
Code: Select all
jr= JointReaction();
jr.setOn(true);
jr.setStepInterval(1)
jr.setInDegrees(true)
jr.setStartTime(initial_time);
jr.setEndTime(final_time);
analyzeTool.getAnalysisSet().adoptAndAppend(jr)
x1=analyzeTool.getAnalysisSet().get(0).getPropertyByIndex(5);
PropertyHelper.setValueString('C:\OpenSim 3.3\StaticOptimization\subject07_StaticOptimization_force.sto',x1);
x2 = analyzeTool.getAnalysisSet().get(0).getPropertyByIndex(7);
PropertyHelper.setValueString('parent',x2);