Customize saving path of AnyOutputFile class

Hi,

I am using the Plug-in-gait_simple FullBody_GRFPrediction model.
I want to save some variables using AnyOutputFile class. I can use this class and added it inside the inverse dynamics study. The problem is that the text file is saved in the Setup folder, but I want to save it in another arbitrary folder. How can I customize the save path of this class?

Best regards,
Mohammadreza

Hi @mrb9

You can write the full path of the file in the FileName variable or use relative paths if desired.

Best regards,
Bjørn

Dear Bjørn,

Thanks for your response.
Actually, I tried a lot, but I couldn't do so.
Right now, the file is saved in Setup folder, but I want to save it in another folder in the same directory as Setup folder. Let's assume its name is X. So, I have to go back one folder and then go to X folder.
Can you please help me with this?
That would also be great if you could tell me how can I get the directory of my main file.

Best regards,
Mohammadreza

Hi @mrb9

You can use ../ to go one directory level up.
../X/ will take you one level up and into X.

AnyBody saves the both the main file directory name and path in define statements:

  • ANYBODY_PATH_MAINFILEDIR
  • ANYBODY_NAME_MAINFILEDIR

These you can use in your code.

Best regards
Bjørn

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.