AnyOutputFile generates zero

Hi,
I am trying to use AnyOutputFile to export the results in a csv file in the Plug-in-gait_Simple. There are two problems:

  1. Joint angle is fine, but velocity, moment, and reaction data are exported as zero in the csv file, while they are not.
  2. How can I add all of the item for example in this folder: Main.HumanModel.BodyModel.SelectedOutput.Right.Leg.JointReactionForce

Here is the code:

AnyOutputFile MyResult =
{
FileName = TEMP_PATH+"/"+"MyResult.csv";
NumberFormat = {
Digits = 15;
Width = 22;
Style = ScientificNumber;
};
SepSign = ",";
LineSepSign = "";

AnyVector AnklePlantarFlexionAngle = ..BodyModel.Interface.Right.AnklePlantarFlexion.Pos;
AnyVector SubTalarEversionAngle = ..BodyModel.Interface.Right.SubTalarEversion.Pos;

AnyVector AnklePlantarFlexionVelocity = ..BodyModel.Interface.Right.AnklePlantarFlexion.Vel;
AnyVector SubTalarEversionVelocity = ..BodyModel.Interface.Right.SubTalarEversion.Vel;

AnyFloat AnkleMoment = Main.HumanModel.BodyModel.SelectedOutput.Right.Leg.JointMomentMeasure.AnklePlantarFlexion;
AnyFloat AnkleForce = Main.HumanModel.BodyModel.Right.Leg.Jnt.Ankle.Constraints.Reaction.Fout;
};

Hi Alireza,

1.) Which study are you running? You would need to run the inverse dynamics analysis to export all the data. It seems like the output file is only exporting data from the marker tracking study. This may also happen because the output file is not included in the inverse dynamics study somehow. You can do that by including a pointer to MyResult in your inverse dynamics study.

Main.Studies.InverseDynamicStudy = {
   AnyFolder &output = <Pointer to MyResult>;
};

2.) You can add all those items by making a pointer to that folder within the AnyOutputFile, so write something like this inside the code for the AnyOutputFile:

AnyFolder &RJRF = Main.HumanModel.BodyModel.SelectedOutput.Right.Leg.JointReactionForce;

Best regards,
Dave

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.