In Mechanical scripting, I would like to change the options found under Files > Options...
ExtAPI.Application.ScriptByName("jscript").ExecuteCommand('WB.PreferenceMgr.Preference("PID_Accelerated_Graphics") = -1;')
You can determine the internal name of the option (e.g. "PID_Accelerated_Graphics" in the above example) and its possible values from the dsPreferences.xml file, which can be found in the user's appdata folder, for example: C:\Users\userid\AppData\Roaming\Ansys\v242\en-us\dsPreferences.xml
Hello Landon, Thank you for the interesting code snippet. However, it seems that the changes are not persistent. Do I need to call a specific function to store the settings permanently, similar to how it's done with the workbench?https://discuss.ansys.com/discussion/2863/how-can-i-set-workbench-wb-user-preferences-via-script?utm_source=pocket_shared
Found it: ExtAPI.Application.ScriptByName("jscript").ExecuteCommand('WB.PreferenceMgr.Save()')
ExtAPI.Application.ScriptByName("jscript").ExecuteCommand('WB.PreferenceMgr.Save()')