If I understand correctly, you have defined MFdL1L3_CSA as an AnyVar. AnyVar holds a single dimensional value and you can't really index an AnyVar. You would need to use a multi-dimensional variable like an AnyFloat or AnyVector.

Then, to index the value, you would need to provide the proper path to the iStep: so something like:

Thank you for your advice, I corrected my previous mistake according to the way you said. But as you can see, I want to modify my mannequin with the value of each iStep. But how do I have the program automatically rerun InverseDynamics after each iStep modification of the model to get new mechanical parameters?

Could you please briefly explain what exactly you want to do? I am sorry, i don't understand what variables you want to use and what variables you want to modify.

Sorry, I probably didn't describe it very well before. I want to use two variables, one is the cross-sectional area of the muscle and the other is the maximum activation of the muscle. I defined two studies in my program, one to obtain the maximum activation of the muscles under the current posture and cross-sectional area, and one to obtain the new muscle cross-sectional area using the formula using the maximum activation input. I want to update the cross-sectional area of the muscle in each istep and get a new muscle maximum activation du based on the new muscle cross-sectional area.I wonder if there is any way this can be implemented.