Client/Server#

You can launh PyAEDT on a remote machine if these conditions are met:

  1. PyAEDT is installed on client and server machines. (There is no need to have AEDT installed on the the client machine.)

  2. The same Python version is used on the client and server. (CPython 3.6+ or IronPython is embedded in the AEDT installation.)

Windows Server#

Here is an usage example for a Windows server:

# Launch the latest installed version of AEDT in graphical mode.

from pyaedt.common_rpc import launch_server
launch_server()

Linux and Windows Clients#

Here is an usage example for the client side:

# Launch the latest installed version of AEDT in graphical mode.

from pyaedt.common_rpc import client
my_client = client("full_name_of_server", port=18000)
circuit = my_client.root.circuit(specified_version="2022.1", non_graphical=True)
...
# code like locally
...

Linux Server#

To bypass current IronPython limits, you can launch PyAEDT on a Linux machine:

  1. Using pip, install PyAEDT 0.4.23 or later on a Linux machine.

  2. Launch CPython and run PyAEDT on the same machine.

    # Launch the latest installed version of PyAEDT in non-graphical mode.
    
    from pyaedt.common_rpc import launch_ironpython_server
    client = launch_ironpython_server(ansysem_path="/path/to/ansys/executable/folder", non_graphical=True, port=18000)
    hfss = client.root.hfss()
    # put your code here
    
  3. Launch CPython Server on a machine and connect to the server from anaother machinee.

    # Launch the latest installed version of PyAEDT in non-graphical mode.
    
    from pyaedt.common_rpc import launch_ironpython_server
    launch_ironpython_server(ansysem_path="/path/to/ansys/executable/folder",
                             launch_client=False,
                             non_graphical=True,
                             port=18000)
    # connect to the port 18000 from the client machine
    
  4. If the method returns a list or dictionary, use this method to work around an issue with CPython handling:

    box1 = hfss.modeler.create_box([0,0,0],[1,1,1])
    # convert_remote_object method convert remote ironpython list to local cpython.
    faces = client.convert_remote_object(box1.faces)
    
Electronics Desktop Launched