Setting Options via Configuration Files
In addition to setting options from the Electronics Desktop user interface (UI), you can also set options in several configuration files. Option settings in configuration files may apply to all users or only to a specific user, and they may apply to all hosts or only to specific hosts. There are four levels of settings, listed below from most specific (highest precedence) to most general (lowest precedence):
- Host-dependent user options – apply to the specified user on the specified host only
- Host-independent user options – apply to the specified user on all hosts
- Host-dependent default options – apply to all users on the specified host
- Installation default – default for all users on all hosts
In the list above, settings at any level override settings at lower levels . If there is no setting in any file, the application default value is used. See UpdateRegistry for instructions on selecting these levels.
Options set from the Desktop UI override and update user settings in configuration files. Otherwise, the existing configuration file settings are used.
Behavior Examples
Consider running an application as user jsmith on host host123. If there is no host-dependent user setting for the Expand Project Tree on Insert option in the host-dependent user options config file for user jsmith on host host123, but there is a setting for the "Expand Project Tree on Insert" option in the host-independent user options config file for user jsmith, then the latter setting will be used if it is not overridden using the Desktop UI. Any settings in the host-dependent default options config file or the installation default config file are ignored.
As another example, consider running an application as user jdoe on host host123. If there is no setting for the Expand Project Tree on Insert option in the host-dependent user options config file for jdoe on host123 or in the host-independent user options config file for user jdoe or in the host-dependent default options config file for host host123, then the value from the installation default config file are used, if present.
Rules for Modifying Option Settings
Option settings displayed in the Desktop UI follow the above rules. That is, if there is a setting in any of the option config files, then the setting from the highest priority config file is displayed in the Desktop UI. If there is no setting in any of the option config files, then the global default value is used. You can modify settings using the Options dialog boxes in the Desktop UI. If the dialog box is closed with the Cancel button, changes made on any of the tabs are discarded. If the dialog box is closed with the OK button, any settings that have been changed by the user are written to the host-dependent user options config file. The changed values written to this file are then used the next time that the application is run by the same user on the same host. The Desktop UI option settings are not written to any of the other option config files.
Configuration File Locations
The configuration files for host-dependent and installation default options reside at: <installation_directory>\<version>\<platform>\config. The configuration files for host-dependent and host-independent user options reside in a subfolder of the user's Documents folder (for Windows) or the user's HOME folder (for Linux). See the tables below for specific Windows and Linux file names and paths.
Products with Multiple Desktop Versions
For products that have multiple Desktop versions, each will have a separate user-specific config directory, with a different value for the <ApplicationName&Version> directory name.
Table of Directories and Files
The following table shows the directories and files, where the Level Name is the name used to describe an options config file when using the UpdateRegistry tool.
Config File |
Level Name |
File Name |
Windows Directory Path |
Linux Directory Path |
host-dependent user options |
user_machine |
<hostname>_user.XML |
%UserProfile%\Documents\Ansoft
|
$HOME/Ansoft
|
host-independent user options |
user |
user.XML |
||
host-dependent default options |
install_machine |
<hostname>.XML |
<InstallationDirectory>\v<version>
|
<InstallationDirectory>/v<version>
|
installation default |
install |
default.XML |
- <hostname> is the name of the computer on which the Electronics Desktop software is installed
- $HOME is the user's home directory on Linux
- <ApplicationName&Version> is the product name (without spaces) followed by the four-digit year of the version, a decimal point, and the minor release number (such as ElectronicsDesktop2024.2)
- %UserProfile% is a Windows variable that represents the currently active user's profile (for example, C:\Users\JohnDoe)
- <InstallationDirectory> is the root folder where the Electronics Desktop software is installed (typically, C:\Program Files\AnsysEM, on Windows, or /opt/AnsysEM, on Linux)
- <Version> is the last two digits of the product version's year followed by the minor release number, without a decimal point (such as 221)
The following table shows an example of specific file names and directory names for a typical Ansys Electronics Desktop installation on Microsoft Windows and on Linux. These are the files that apply to software version 2022 R1, user "jsmith," and hostname "host123":
Config File |
Level Name |
File Name |
Windows Directory Path |
Linux Directory Path |
host dependent user options |
user_machine |
host123_user.XML |
C:\Users\jsmith\Documents\Ansoft
|
/home/jsmith/Ansoft
|
host independent user options |
user |
user.XML |
||
host dependent default options |
install_machine |
host123.XML |
C:\Program Files\AnsysEM\v242
|
/opt/AnsysEM/v242/Linux64/config |
installation default |
install |
default.XML |
As with the temporary file location configuration files, the settings in these options files have precedence in the following sequence: user_machine (highest precedence), user, install_machine, install (lowest precedence). The first time you start and then exit the application, the file at the "user_machine" level is created (<hostname>_user.XML). The other files are only created if you use the UpdateRegistry tool to specify an option at the "user," "install_machine," or "install" level. If the temporary directory is set to an empty string in a configuration file, then that setting is ignored.