Problems with AnyOutputFile

I’ve attached my model, which is based off of the GaitFullBody Mo-Cap driven model. Before adding the AnyOutputFile code, I ran the inverse dynamic model to get the outputs, and used the Insert Object Name function in the right-click menu to insert the reference to the output I wanted. This is the (part of) the coding that I added as a “subfolder” in my AnyBodyStudy:

AnyOutputFile output = {
FileName = “EMGOutput.txt”;
//Muscle 1 - Anterior Deltoid
AnyFloat DeltScap1 = Main.Studies.InverseDynamicStudy.Output.HumanModel.Right.ShoulderArm.Mus.deltoideus_scapular_part_1.CorrectedActivity;
};

After adding that code and trying to run my Inverse Dynamic model again, I get the following error:

ERROR(SCR.PRS9) : X:/D…n/A…s/C…s/S…n/A…n/E…s/G…y/GaitFullBody.main.any : ‘HumanModel’ : Unresolved object

Where am I going wrong?? Thanks in advance for any insight.

Hi,

It seems that your model is based on the older versions of AMMR ( older than AMMR V1.3.X maybe).

We are sorry to say but we don’t support the models based on the old AMMR versions.

Best regards,
Moonki

I’m using AMMR version 1.3. I posted in the Self-supported forum because of past concerns about having an older version. In the thread I posted on the self-support forum, I specified my AMMR and AnyBody version and you still told me to post here. If you were just going to refuse to help because of the version, why did you tell me to post here in the first place?

Hi,

First, I’m sorry for my previous comments.
The reason why I recommended you to write a new post here is that usually users don’t get any help from the self-supported forum.
At that time I might overlook the AMMR version that you wrote. I’m sorry again about that.

When I looked your code without running it, I found a simple mistake.

AnyOutputFile output = {
  FileName = "EMGOutput.txt";
  //Muscle 1 - Anterior Deltoid
  AnyFloat DeltScap1 = Main.Studies.InverseDynamicStudy.[b]Output[/b].HumanModel.Right.ShoulderArm.Mus.deltoideus_scapular_part_1.CorrectedActivity;

You can not use the values from the ‘Output’ folder under AnyBodyStudy class for another variable.

So you can just try like this:

AnyOutputFile output = {
  FileName = "EMGOutput.txt";
  //Muscle 1 - Anterior Deltoid
  AnyFloat DeltScap1 = Main.Studies.InverseDynamicStudy.HumanModel.Right.ShoulderArm.Mus.deltoideus_scapular_part_1.CorrectedActivity;

I hope that this may work for you.

Best regards,
Moonki