Set workbench user preferences on program start
Hello,
According to the documentation I can set the options of the workbench via a journal file:
Note: An IT manager can a place a site-wide configuration file into the installation directory of each client machine to ensure that the Workbench software preferences are configured as the company requires. To force a preference to be set to a particular value at startup, edit \Program Files\ANSYS Inc\23.1\Framework\Site\SiteStartup.wbjn.
I tried to record a macro setting the options, but the recorded journal file was empty.
How can I set the options in a journal file?
I'm interested in this option in particular:
Regards,
Jonas Förster
Answers
-
Thanks @Pierre Thieffry for the solution:
SetPreferenceValue('Mechanical_RunPythonCodeOnStart', True)
Accordingly,
GetPreferenceValue('Mechanical_RunPythonCodeOnStart')
returns the current value of the setting.
To get the names of the the settings, you can set the setting manually in the options dialog and then check the .xml files in %appdata%\Ansys\v231\UserRegFiles_*. The MechanicalPreferences.xml contains the user preferences for the mechanical settings.
1