Problem with Anybodycon

Hello !
I’m wanted to use the AnyBosyCon.exe again. For that I added the path into my system variables and user variables.

I’m able to launch the app via the cmd. However, when I write

load  "main.any" 

via the cmd I get this error : " ERROR<SCR.SCN9> System and load argument definitions <Virtual File><9> : ‘AnyBodycon.exe’ : Path does not exist.

However, I checkedthat I added the path into my system variables and user variables…

Moreover, I’m able to launch the ‘run’ operation and get my output file defined the main.any.

Would you have any suggestions / answers about my issue ? Will it limit me in terms of computing efficience for example ?

Thank you for your help !

Hello Lauranne,

I am afraid I don’t really understand what you are typing. So you set up the path variable to be able to type something like


which starts the AnyBody console application. Are you typing the

load "main.any"

in the console application (typically the line has only a “>” in front in that case) or are you using that as an argument when you start AnyBodyCon.exe?
What is written in the main.any file?

Best regards

Hello Daniel,
First, sorry for my lack of description in my problem explanation…

In fact I got the error in all cases :

  • when calling anybodycon.exe in a first time and then
load "main.any"
  • when calling AnyBodyCon.exe with a macro as input :
Anybodycon.exe /m "macro.anymcr"

I think that the problem arrise typically when the command “launch” is sent because the call of anybodycon.exe does not create any error (licence file well found). The error comes after the line “loading Main”.

I attached a screenshot of my cmd to be clearer.


Hi Lauranne,

I could reproduce the behavior you described and it looks as it is related to the use of the PATH variable. I think this is a problem we have to look into and fix it.
As a work around you should use the full path when you call the console application. I haven’t seen the error message when doing this.

Best regards

Hi Daniel,
Thank you for the advice, it solved effectively the issue.

I would have another question related to the anybodycon. I would like to export a bone with the “export surface” classoperation.

What I would like would to define that in a macro.anymcr and call it when launching anybodycom.exe in the cmd prompt. Here is the macro :

"C:\Program Files\AnyBody Technology\AnyBody.6.0\AnyBodyCon.exe" /d "D:\Models\PD07-EtudeAnybody\Application\Validation\ContactModel"

load "ContactModel.Main.any"  
operation Main.Study.InitialConditions 
classoperation Main.HumanModel.BodyModel.Right.ShoulderArm.Seg.Scapula.DrwSurfRes\ "Export surface\" --file=\"D:\\Results\\Os Scales\\ScapulaScale\\Scapula.stl" --scale=1000.0 --reference=global

However I get this error :
ERROR(OBJ.FILE1) : Problem with file : \ : Failed to save value to this file. The file could not be opened for witing.

I also tried to not specified any path (i.e. : --file = Scapula.stl) but I get the same error.

In fact, I think that I don’t know and don’t understand how to write a specific path for the exported surface for the classoperation “export surface” ?

Thank you !

Hi Lauranne,

I tried it and it worked fine for me when I used simple quotes (") and simple (back-) slashes (\ or /) on a simple example. Otherwise I took your syntax.

Best regards

Hi Daniel,
First, sorry for the delay and thank you for your answer.However, I still have some problem when calling anybodycon.

The following line works fine for me if I directly write it ine the cmd window :

"C:\Program Files\AnyBody Technology\AnyBody.6.0\Anybodycon.exe" /d "D:\Dropbox\70. Anybody\1-Models\PD07-EtudeAnybody\Application\Validation\ContactModel\Macro" /m "Scale_Macro.anymcr"

But I now would like launch it via a C++ program. I created a button and assigned the following command :

system("\"C:\\Program Files\\AnyBody Technology\\AnyBody.6.0\\AnyBodyCon.exe\"  /d \"D:\\Dropbox\\70. Anybody\\1-Models\\PD07-EtudeAnybody\\Application\\Validation\\ContactModel\\Macro\" /m \"Scale_Macro.anymcr\"");

When the command is launch, I get this error :

'C:\Program' n'est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

Could you help me to solve it ?
Thank you !!

Hi Lauranne,

I typically read these error messages in English, but for me it sounds as this is not an AnyBody problem but a c++ issue with system.

Anyway, I would try to protect the space after Program with a ‘’, so something like “Program\ Files”. As alternative, I would try to use a fork and one of the exec system calls instead of system, e.g. execvp(…).

Best regards

Hi Daniel,
Thanks for the return. And sorry for the french message, I did not realized the wrong language :wink:

I finally successfully run the ‘system’ command. Maybe it could be helpful for others so here is the soluce :

system("\" \"C:\\Progra~1\\AnyBod~1\\AnyBody.6.0\\AnyBodyCon.exe\" -d \"D:\\Dropbox\\70. Anybody\\1-Models\\PD07-EtudeAnybody\\Application\\Validation\\ContactModel\\Macro\" -m \"Scale_Macro.anymcr\"\"");