In a mos script, I want to save the current directory (i.e. the directory where the mos script is) to a string variable. In a second step, I want to open a library that is located in a directory net to the mos file.
I tried it like this:
myCWD = Modelica.Utilities.System.getWorkDirectory();
but this will always have the value C:\USERNAME\Documents\Dymola
.
Is there a way to get the path of the mos file itself, from within the mos script? Or are there better ways to use relative paths, or construct absolute paths from a relative path (but always relative to the mos file)?