Dymola mos script environment variables
问题 Is there a way to use the Windows environment variables in Dymolas .mos scripts? Something like this: // Load libraries, last one determines the working directory openModel(%USERPROFILE% + "Documents/Dymola/MyTestLib/package.mo"); Alternatively, does Dymola know some other predefined pathes? I would like to make .mos script a bit more portable to a different PC. 回答1: You can use the getEnvironmentVariable function from the MSL. So this should do what you want: user_profile = Modelica