Custom variables with iStep

I defined two variables and wanted to assign the value of one variable to the other at each ISTEP, the procedure is as follows:

*AnyVar MFdL1L3_CSA = -(S0+1-MFdL1L3_CSA_10)*exp(-14/(24*T0))+S0+1;*
  • };*

  •           };//muscle group*
  •         *
  • AnyOperationSetValue SetValue = {*

  • Target = { &Main.HumanModel.BodyModel.Trunk.MuscleParametersSpineRight.TransversusL5_var }; *

  • Source = { &Main.PostProcess_For_InverseDynamicStudy.muscle.Tra.TransversusL5.MFdL1L3_CSA[iStep] };*

but,it went wrong:

ERROR(SCR.PRS9) : SpinePressureStanding.Main.any(6334) : 'iStep' : Unresolved object

Hi Civill,

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:


Best regards,

Hi dschander´╝î

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?

Hi Civill,

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.

Best regards

Hi dschander´╝î

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.

Best regards