for example you could have a look at the LegMoments.any. There you can find the command AnyForceMomentMeasure2 which is what you are looking for (at least I think so). There is also a list which ensures that all muscles are included: #include “LegMuscleNames.any”.
Through this file the XXXNetMomentMuscle-variables are created and I think these include the muscle forces for a joint.
as far as i understand, AnyForceMomentMeasure2 can be used to summarize forces using a list of muscles. Correct? I don’t like to create a muscle list (e. g. because the list must be updated if i remove some muscles).
The LegMuscleNames.any does only include leg muscles for this specific model.
I thought, as AnyBody is primarily a program to calculate muscle forces, there should be a comfortable way to export them?
to answer your question, if it is possible to export a list of all muscles in AMS version 5.2: Yes and No.
First the No: Unfortunately there is no one-click-solution for the export of all muscles, neither for reaction forces, segment positions and all the other things you could think of when you see the model.
But if you there is a possibility to create a list of all muscles from the output you can generate from AMS and which we already used a couple of times (and this works also for earlier versions than 5.2).
One way to create a list of all muscles is to export the output of a study in the h5 format and read this output with a small python script which parses through the h5 tree looking for groups in the tree which contain a dataset with a name specific for an instance of an AnyMuscle like class, e.g. the dataset “Activity”. Then the names of these groups can easily be written to a text file.
to export the results of a study no script is needed: You just have to find the “Output” folder in the model tree and then chose “save data” after right clicking it. Then chose the “deep structure” to get the h5-file.