Reputation: 25
I want to modify the working directory during startup of Dymola.
I have come across this article from Claytex about a file called dymola.mos, that is loaded during the startup of Dymola. I have already used this to modify some variables (works), however, I'm unsure how to change the working directory. Here's the code (first block is the default content of the file, 3rd block is the working modification of the variables):
// RunScript("$DYMOLA/insert/displayunit.mos", true);
// RunScript("$DYMOLA/insert/displayunit_us.mos", true);
definePostProcessing("SDF output", "Convert result file to SDF format", "Modelica.Utilities.System.command(\"\\\"%DYMOLA%/bin/dsres2sdf\\\" %RESULTFILE%.mat %RESULTFILE%.sdf\")");
// Working directory
cd("C:/Data/Dymola");
// Settings
Advanced.Translation.MaxStringLength = 5000;
Advanced.Translation.ParallelizeCode = true;
Can somebody help with this? Also, is there a more extensive description / tutorial of what can be done with this script?
Upvotes: 0
Views: 69
Reputation: 12507
As indicated in the comment "Tools -> Options -> Settings", "Save last working directory" is applied after running start-up script, thus overriding the cd-command in the start-up script.
Apart from that it is just a normal script.
Upvotes: 1