L4 .xml Export

To whom it may concern,

Before I delve into my problem, a brief description of the model is the following:

-Using the Template MoCapModel I was able to insert subject c3d data.
-Through the scaling Law I was able to morph an L4 spine obtained from CT scans into the AnyBody L4 spine.
-MoCapModel now contains personalised gait and personalised vertebra.

Current problem:

I would like to export the forces being felt on the L4 vertebra, to do so I created a folder called files_in within the MoCapModel folder. The code used to export the .xml data was inserted at the end of the inverse dynamics file with code as shown below.

Unfortunately for some unknown reason, even though the program works without an error, no files are being output.
Is the code correct? perhaps my output file directory isn’t specified correctly? or perhaps apart from this section of code in the inverse dynamics file, I should also insert a function in the main file?

I am currently using 6. 0. 4. 4327 (64-bit version), through remote desktop.

Many thanks to anyone who may help!


Code:

AnyMechOutputFileForceExport FE_out_L4 =
{
FileName = “files_in/L4.xml”;
/NumberFormat =
{
Digits = 15;
Width = 22;
Style = ScientificNumber;
FormatStr = “”;
};
/
UseRefFrameOnOff = On;
AllSegmentsInStudyOnOff = Off;
XMLformatOnOff = On;
AnyRefFrame &ref1 = Main.Studies.HumanModel.BodyModel.Trunk.SegmentsLumbar.L4Seg.LSNode;
AnySeg &L4vertebra = Main.Studies.HumanModel.BodyModel.Trunk.SegmentsLumbar.L4Seg;
};

Hi

Please double check that the script you listed are inside the study or referred to, otherwise it will not be executed.
Please also check that you have a folder named “files_in”

Best regards
Søren

Dear Soren,

Thanks very much for your prompt reply!
I do have the folder named “files_in” then it must be because it isn’t referred to in the main file, what would be the line of code in order to do so please? Or should I simply insert all the code within the main study folder?

Many thanks in advance!

Dear Louise,

The structure should be something like that:

 //your.main.any

...

Main.Studies.InverseDynamicsStudy = {
 AnyMechOutputFileForceExport FE_out_L4 = {
  FileName = "files_in/L4.xml";
  UseRefFrameOnOff = On;
  AllSegmentsInStudyOnOff = Off;
  XMLformatOnOff = On;
  AnyRefFrame &ref1 =   Main.Studies.HumanModel.BodyModel.Trunk.SegmentsLumbar.L4Seg.LSNode;
  AnySeg &L4vertebra = Main.Studies.HumanModel.BodyModel.Trunk.SegmentsLumbar.L4Seg;
 };

}; // closing bracket of the Main = {

The folder structure should be:
Your model:

  • files_in
  • Input
  • Model
  • Output

Regards,
Pavel

Dear Pavel,

Thanks very much! I had the code within the wrong parenthesis.

Just as a side note; from the section of code you gave me I simply had to change it to InverseDynamicStudy as opposed to InverseDynamicsStudy for it to match my model.

Many thanks once again for your prompt reply it was very much appreciated!
Best regards