macro usage


happy new year to all!

In previous versions it was possible to start AnyBody in a console together with a macro which submits the job:

“AnyBodyCon.exe macro.anymcr” in a dos command window

with macro.anymcr containing, e.g.:

load “StandingModel.Main.any”
operation Main.OptStudy.Optimization

I wonder if i have a typo or if this method is no longer working?



	  		  		 		  		  		  		  		[RIGHT] 			 			 				[IMG][/IMG] 				[[IMG][/IMG]]([/RIGHT]

Hi Thomaz,

I’ve tried: “AnyBodyCon.exe /m macro.anymcr” - this one works.
Must be just the /m.

Best regards,


Thanks a lot, Pavel

Hello All
I have also the same problem I have a macro file and I want to import it to AnyBodyCon.exe
but when I type “AnyBodyCon.exe\m mymacro.anymcr”
it generate the error : commandexpected !!
Please help me . I have read all of the posts related to those people who had the same problem but I finally did not understand how to import a macro in to anybodycon !!!

anither thing , My “AnyBodyCon.exe” and “mymacro” file are in the same folder
The problem is that “AnyBodyCon” is not a valid command for it
How to fix it ?
Many thanks for your help


try using “AnyBodyCon.exe /m mymacro.anymcr”

and the application will not work if you copied the executable somewhere, since it has some dependencies.

I just tried this command by adding a single line: exit to mymacro.anymcr and it worked fine.


Hi Mostafavizadeh,

when i want to run a AnyBody batch job, i change the directory (cd) to the folder which contains the …Main.any. I place the batch.anymcr in this folder as well. And i start the analysis with the full path to the executable:
c:\Programs\AnyBody Technology\AnyBody.5.3\AnyBodyCon.exe" /m batch.anymcr

Take care to use the correct \ “/” oder “”.

Good luck,


Hi Thomaz
I did the same job
my Main file and Macro file is exactly in the same folder with AnyBodyCon.exe
I have not change or copy AnyBodyCon.exe
and I type C:\Program Files\AnyBody Technology\AnyBody.5.2\m mymacro.anymcr
and it again says : error : command expected !!!

even when i type AnyBodyCon.exe/? or AnyBodyCon.exe?
again it generate the same error

Addittionally , I read the tutorial which say that coomands that can be used in console including :load run exit ,…
but nothing has been said about AnyBodyCon.exe as a command

Please help me

Have you been careful when copying the commands?
I miss the “exe” (but this could be all right) and a blank between the command and “/m”
If this is still not working, what does your macro contain?
You could also try to put the whole command in inverted commas, like

“C:\Program Files\AnyBody Technology\AnyBody.5.2.exe” /m mymacro.anymcr