I assume you have activated the option Save startup directory. You can check this with the flag Advanced.StartupDirectory
, which will be either 1 or 2. You can simply turn that off or follow the steps below.
From your command log we see that:
- Dymola first executes the script
<install-path/insert/dymola.mos
- Then it restores the settings stored in
setup.dymx
Hence the settings in setup.dymx
override your working directory.
Instead of using <install-path/insert/dymola.mos
you should use a custom .mos
script, which is passed as first argument to dymola.exe
on startup. This will always be executed last.
Example for Windows
Create the file startup.mos
somewhere, e.g. in C:dymolastartup.mos
Create a shortcut to Dymola.exe
, (for Dymola 2021x: C:Program FilesDymola 2021xin64Dymola.exe
)
Add the .mos script as argument in the Target field
in the properties of the shortcut. The result will be:
"C:Program FilesDymola 2021xin64Dymola.exe" "C:dymolastartup.mos"
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…