Desktop Commands For Registry Values

The Ansys Registry is stored as XML format file. By default it is located at C:\Users\<UserName>\Documents\Ansoft\<AnsysProductNameversion>\config\<PC_NAME>_user.XML. Most of the Ansys product configuration information is stored in this XML file. These methods allow you to change the product configuration in VB or Python.

For example, to set the DSO & HPC analysis setup for HFSS using a Python script:

  1. Start HFSS.
  2. Go to the DSO and HPC options and create a setup named "test".
  3. Export the setup to a file (for example, c:\temp\test.acf).
  4. Copy the exported file to a target PC (for example, f:\temp\test.acf).
  5. Run the following script:

    #import the setup

    oDesktop.SetRegistryFromFile("f:\\temp\\test.acf")

    # Set Active Setup to "test"

    oDesktop.SetRegistryString("Desktop/ActiveDSOConfigurations/HFSS", "test")

See the following subtopics:

DeleteRegistryEntry

DoesRegistryValueExist

GetRegistryInt

GetRegistryString

SetRegistryFromFile

SetRegistryInt

SetRegistryString