macro usage

Hi,

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
run
exit

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

Thanks,

Thomaz

	  		  		 		  		  		  		  		[RIGHT] 			 			 				[IMG]http://forum.anyscript.org/images/misc/progress.gif[/IMG] 				[[IMG]http://forum.anyscript.org/images/buttons/edit.gif[/IMG]](http://forum.anyscript.org/editpost.php?do=editpost&p=11313)[/RIGHT]

Hi Thomaz,

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

Best regards,
Pavel

Perfect!

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

Hi,

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.

Regards,
Pavel

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,

thomaz

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
:confused:

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