Hello everyone,

I call a subprogram from my main program.
In the subprogram I write a measurement report.

I want the measurement report to be automatically saved in the main program directory (the subprogram is located in the user cycles).
Unfortunately, in my Google research I didn't find a way to query the directory of the main program in the subprogram.

I could imagine 2 possible solutions:
1) In the main program, save the current directory in a variable and pass it to the subprogram
2) Maybe there is a command to query the directory of the calling program in the subprogram

I'm certainly not the first to face this problem, but unfortunately I couldn't find a solution.

Can someone help me?

Thanks!