Using Different Dymola Setups on the Same PC

A while ago I wrote a post on the Dymola setup files used to control the Dymola settings, Dymola Setup – Where Is It?; from this I was told about an interesting new feature from Dymola 2021 which allows you to use several different Dymola setups on the same PC. This would be useful to tailor how Dymola is configured for different projects you are working on or for different purposes, like regression testing, a projector configuration for presentations, a developer or user perspective and more.

So in this blog post I’m going to show you how to apply this feature to easily use different Dymola setup configurations on your PC.

Dymola Setup Recap

I’d recommend, if you haven’t already, to read my earlier blog post, Dymola Setup – Where Is It?, to find out about the files used to control the setup in Dymola and how they are applied for context.

But for the purpose of this post, the key point is that there is a setup.dymx file used to store the majority of the setup settings from the Options dialog box in Dymola. This file is stored in your roaming AppData, so probably C:\Users\<user>\AppData\Roaming\DassaultSystemes\Dymola\<version number> .

When Dymola opens it will, by default, use the setup in the file C:\Users\<user>\AppData\Roaming\DassaultSystemes\Dymola\<version number> \setup.dymx.

A simple way to create alternative .dymx setup files for different projects and purposes is to duplicate an existing setup.dymx file for the version of Dymola you are using, give the new file a unique name and modify the settings in a text editor.

-setup Command Line Parameter

To specify which of several different .dymx setup files to use when Dymola is started, you need to use the -setup parameter in the command line argument when launching Dymola. So this command line argument would look something like:

Dymola.exe -setup configuration-to-use.dymx

So for example, in the Windows command prompt I would enter the following to launch Dymola 2021 with the setup file setup2.dymx.

Figure 1 - Command Prompt launch of Dymola 2021 with setup2.dymx
Figure 1 – Command prompt launch of Dymola 2021 with setup2.dymx

Creating a Shortcut to Apply a Specific Dymola Setup

The easiest way to use this -setup parameter to apply alternative Dymola setups is to create a shortcut.

  1. Right click on your desktop and select New > Shortcut
  2. In the field Type the location of the item, browse to the Dymola installation executable, Figure 2
    • For example C:\Program Files\Dymola 2021\bin64\Dymola.exe for Dymola 2021
  3. Select Next
  4. In the field Type a name for the shortcut give the shortcut a descriptive name, figure 3
  5. Select Finish
  6. Right click on your new shortcut and select Properties
  7. In the Shortcut tab of the Properties dialog box, edit the Target field to add -setup configuration-to-use.dymx to the end, figure 4
    • For example the entire Target field could be “C:\Program Files\Dymola 2020x\bin64\Dymola.exe” -setup C:\Users\Hannah\AppData\Roaming\DassaultSystemes\Dymola\2021\setup2.dymx with a space before -setup
  8. Select OK
Figure 2 - Defining the shortcut path, dialog box for step 2
Figure 2 – Defining the shortcut path, dialog box for step 2
Figure 3 - Specifying the shortcut name,, dialog box for Step 4
Figure 3 – Specifying the shortcut name, dialog box for Step 4
Figure 4 - Modifying the shortcut target to use alternative setup file, dialog box for step 7
Figure 4 – Modifying the shortcut target to use alternative setup file, dialog box for step 7

You will now have a shortcut on your desktop that will allow you to launch an instance of Dymola with a specific .dymx setup file applied. You could create several of these shortcuts to allow you to easily use different Dymola setups as required by your work.

You can confirm the correct setup file has been applied by looking at commands run during startup in the Dymola command window, as shown in Figure 5.

Figure 5 - Setup file loading commands in the command window when launching Dymola
Figure 5 – Setup file loading commands in the command window when launching Dymola

Where you should see a line such as:

Successfully loaded settings file C:/Users/Hannah/AppData/Roaming/DassaultSystemes/Dymola/2021/setup2.dymx

Using Different Dymola Setups

If you need to customise your Dymola setup for the different projects and purposes for your work everyday, using the -setup command line parameter can make this easy and quick to do.

Written by: Hannah Hammond-Scott – Modelica Project Leader

Please get in touch if you have any questions or have got a topic in mind that you would like us to write about. You can submit your questions / topics via: Tech Blog Questions / Topic Suggestion

CONTACT US

Got a question? Just fill in this form and send it to us and we'll get back to you shortly.

Sending

© Copyright 2010-2020 Claytex Services Ltd All Rights Reserved

Log in with your credentials

Forgot your details?