no output with AnyOutputFile

Hi,

I have difficulties in writing ligament lengths to a file. I created a study which looks like this:

  AnyBodyStudy Ligaments = {
    AnyFolder &Model = .Model;
    tEnd = 1.0;
    Gravity = {0.0, -9.81, 0.0};
    nStep = 2;
    AnyOutputFile output = {
      FileName = "LigamentLengths.txt";
      NumberFormat.Style = DecimalNumber;
      Header.TitleSectionOnOff = Off;
      Header.ConstSectionOnOff = Off;
      Header.VarSectionOnOff = Off;
      Header.ColumnNamesOnOff = On;  
      
      
      AnyVar SSL = Main.HumanModel.BodyModel.Trunk.Ligament.Pos;
      
    };
  };

But in the output file the lengths are all zero

Main.Ligaments.t,Main.Ligaments.output.SSL
     0.000000000000000,     0.000000000000000
     1.000000000000000,     0.000000000000000

although Pos = {0.03354102, 0.07979385} when double clicking in the model tree.

When i replace Pos with Fin, i get the correct ligament forces in the output file. Has this something to do with the format? Pos is a vector with 2 components because nStep=2 and Fin is a matrix Fin = {{0}, {-108705.3}}.
I tried with AnyOutputFun, but without success.

Can someone please give me a hint? (AMMR ver. 1.5, AB ver. 5.3)

Thanks, Thomaz

Thomas,

Looks like a bug. I tried making a small example and get the same behaviour.

The workaround for now may be to use:
AnyVar SSL = Main.HumanModel.BodyModel.Trunk.Ligament.Line.Pos;

Regards,
Pavel

Hi Pavel,

thanks for the hint. With “AnyFloat” it works for me.

Kind regards,

Thomaz