Different time range when run Inversedynamic with AnyBody and AnyPytools

Hi, I was assigned by my team to study AnyPytools because we want to run a parameter study, however; I'm quite new to Pytons and Anyscript. I tried to run the same model using AnyBody and AnyPytools to check if my code is correct. I got different time range (x-axis value) between both results. Could you give me a suggestion on what's wrong with the code ? Please let me know if you need more information. Thank you very much.

Tum

Hi @Tum

Welcome to the AnyBody forum!

It sure looks wrong from the images you send.
You seem to run the "Load Parameters" operation in you macro - does those data correspond to those you have in the GUI?

Also check that the trial your macro is running is also the one you run in the GUI.

Since you mentioned you need to learn Python/AnyPyTools Here is a tip on how to simplify the macro in your script:

macro = [
    Load("Main.any"),
    OperationRun("Main.RunAnalysis"),
    Dump("Main.Studies.InverseDynamicStudy.Output.Abscissa.t"),
    Dump("Main.Studies.InverseDynamicStudy.Output.MaxMuscleActivity")
]

The anypytools.macro_command classes take care of formatting the macro strings parsed to AMS and the Main.RunAnalysis operation is a wrapper around all the operations you specified in your macro.

Best regards
Bjørn
AnyBody Technology