Using a Python Script to Configure an Ansys SIwave™ Solution Setup

Complete the steps in the following sections to start/stop recording a Python script (i.e., a *.py file), or to generate an Ansys ECAD database file (i.e., a *.def file) via Python script. Then import the newly created custom settings into an Ansys SIwave™ solution setup.

Recording a Python Script

  1. Do either of the following to open an explorer window:

  1. Navigate to an appropriate directory to save the Python file. Then enter a File name and click Save.

    Explorer Window

  2. Complete any/all functions required. All actions taken within the Ansys Electronics Desktop (AEDT)TM electronics systems design platform that have a matching script are recorded and saved to the Python file.

  3. To complete the Python and script and stop recording, do either of the following:

    • Navigate to the Automation tab and click Stop Recording.

      Stop Recording

    • From Tools, select Stop Script Recording.

      Stop Script Recording

Running a Python Script

  1. Do either of the following:

    • Navigate to the Automation tab and click Run ScriptRun Script.

      Run Script > Run Script

    • From Tools, select Run Script.

      Tools > Run Script

  2. Navigate to the chosen directory and select the IronPython Script File (e.g., EDB_script_example.py).

    Run Script Explorer Window

  3. Click Open. The script generates a new Ansys ECAD database file at the location specified in the script (e.g., temporaryDirectory = "C:\\testDir").
  1. From File, select ImportEDB to open an explorer window.

    File > Import > EDB

  2. Navigate to the directory specified in the script file. Then select the Ansys ECAD database file (i.e., edb.def) and click Open.

    Explorer Window

  3. From the Project Manager window, expand the Project Tree[active design folder]Analysis and double-click the Ansys SIwave™ setup (e.g., siwave) to open the SIwave Solution Setup window.

    Project Manager > Project Tree > Active Design Folder > Analysis > SIwave

  4. Navigate to the S-Parameters tab to view the newly imported custom model settings.

    SIwave Solution Setup Window

Copying and Pasting Script Commands

  1. From Tools, select Open Command Window to open the Iron Python Command Window.

    Tools > Open Command Window

  2. Copy and paste (e.g., Ctrl+C, Ctrl+V) the script text at the command line. Then press Enter.

    Enter Command Line Text

  3. The script commands generate a new Ansys ECAD database file at the location specified in the script (e.g., temporaryDirectory = "C:\\testDir").

  1. From File, select ImportEDB to open an explorer window.

    File > Import > EDB

  2. Navigate to the directory specified in the script text. Then select the Ansys ECAD database file (i.e., edb.def) and click Open.

    Explorer Window

  3. From the Project Manager window, expand the Project Tree[active design folder]Analysis and double-click siwave to open the SIwave Solution Setup window.

    Project Manager > Project Tree > Active Design Folder > Analysis > SIwave

  4. Navigate to the S-Parameters tab to view the newly imported custom model settings.

    SIwave Solution Setup Window