Simulation Log File from Batch Processing

Hello AnyBody Community,

  • AnyBody.8.1.4
  • AMMR4-Beta
  • AnyPyTools 1.20.2
  • Jupiter Notebook

I am simulating several dozens of mocap data with plugin_gait model using batch processing. I get .txt log file when the simulation is unsuccessful. The question might sound silly, but how do I set so that ALL simulations log file are being saved rather than just the unsuccessful ones?

Thank you.

Kind regards,
Faizal

Hi Faizal.

You can force it to not delete the log files by doing:

from anypytools import AnyPyProcess

app = AnyPyProcess(keep_logfiles=True)

You can also give the log files explicit names and put them in a subfolder iif needed. Then you just do the following when calling the start_macro() method.

app.start_macro(macro_list, logfile= "logs/my-logfile.txt")

If you run many macros it will automatically add numbers to the logfiles logs/my-logfile_0.txt, logs/my-logfile_1.txt etc.

Best wishes,
Morten

1 Like