PyAEDT inside AEDT #2921
-
In the documentation, it states: PyAEDT works both inside AEDT and as a standalone application. This Python library automatically detects whether it is running in an IronPython or CPython environment and initializes AEDT accordingly. PyAEDT also provides advanced error management. Usage examples follow. Do you have an example of how to import and use pyaedt inside AEDT? I see a lot of examples of pyaedt launching AEDT like a subprocess, but I don't see how you would use PyAEDT inside AEDT, for example inside AEDT: Tools -> Run Script -> Pyaedt_script.py (?) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
If you have HFSS open already you can run scripts from python using the already open hfss instance by using the new_desktop_session=False flag in the pyaedt.launch_desktop(...) command. You'll need to define the project name and design names to match what you have open already if your aim is to use python scripting to manipulate or grab data from an existing design. |
Beta Was this translation helpful? Give feedback.
-
Okay, so it detects a currently running HFSS instance and interfaces with it, but does this need to be done with IronPython? This also works with CPython correct? |
Beta Was this translation helpful? Give feedback.
-
If you open |
Beta Was this translation helpful? Give feedback.
If you have HFSS open already you can run scripts from python using the already open hfss instance by using the new_desktop_session=False flag in the pyaedt.launch_desktop(...) command. You'll need to define the project name and design names to match what you have open already if your aim is to use python scripting to manipulate or grab data from an existing design.