Error message in console

Hi,

I am trying to run an optimisation with the GaitLowerExtremity model. I’m running it from Matlab so have two batch files set up to run the model (one for the motion and parameter optimisation and one for the inverse dynamics) by running macros. Unfortunately when the second macro gets to the last command I get the following message:

“Warning : exit : has no effect for macro running from GUI.”

The exit command works fine in the first macro and the rest of the second macro works fine. The batch files and macros look like this:

First batch file:
REM run AnyBody console

cd “C:\Program Files\AnyBody Technology\AnyBody.5.0”
AnyBodyCon.exe /m “runMoOpt.anymcr” /d “C:\Users…\Examples\NoSad Standard NewTMod”
cd “C:\Users…\Examples\NoSad Standard NewTMod”

REM end of program

First macro:
load “GaitLowerExtremity.main.any”
operation Main.MotionAndParameterOptimizationSequence
run
exit

Second batch file:
REM run AnyBody console

cd “C:\Program Files\AnyBody Technology\AnyBody.5.0”
AnyBodyCon.exe /m “runInverseMo.anymcr” /d “C:\Users…\Examples\NoSad Standard NewTMod”
cd “C:\Users…\Examples\NoSad Standard NewTMod”

REM end of program

Second macro:
load “GaitLowerExtremity.main.any”
operation Main.InverseDynamicAnalysisSequence
run
exit

Any ideas on what might be causing the error? What I can do to fix it?

Regards
Alex

Edit: I’m using AnyBody v 5.0 and AMMRV1.1

Edit 2: I’ve tried using AnyBody v 5.1 and it still crashes during the second macro though it doesn’t get to the same exit error. Instead it crashes after it finishes the inverse dynamic analyis. The line of asterisk’s appears but then nothing happens.

Hi Alex,

I am wondering about the switch between the optimization model and the inverse dynamic model at the top of the main file. You have to do the switch manually when using the GUI.
Now in your code it seems that you use the exact same file “GaitLowerExtremity.main.any” in both macros. So i am wondering how do you switch between the models? Are sure that the operation Main.InverseDynamicAnalysisSequence is available for the second macro?

Best regards, Sylvain.

Hi Sylvain,

I’ve written a Matlab script which rewrites GaitLowerExtremity.main.any between the macros running. I’ve checked the script is working correctly using the GUI and it is doing what it should be doing. The inverse dynamics runs fine in the second macro, it just has an issue once that has finished.

Alex

Ok, this is a bug. It seems the problem comes from the macros included in the AnyScript.

I hope it can be fixed soon, but meanwhile there is not much to do about it, sorry.

Best regards, Sylvain.