Open AlfVII opened 3 hours ago
Hi @AlfVII,
Thanks for opening this issue.
I tried on my side with a dummy file and it works.
Although this is not implemented in PyAEDT, you can access the "BoundarySetup" thanks to oboundary.
In my case it works like that:
self.aedtapp.oboundary.OrderCoilTerminals(["NAME:Winding_65LIKI","Coil_PTJ5R7", "Coil_ETDM14"])
Could you also try to get rid of any indentation inside OrderCoilTerminals?
Let me know,
Thanks,
Giulia
Hi Giulia,
I tried removing the indentation, but still fails.
I managed to reproduce it in a small project, attached in a zip. ansyas.zip
I am running Ansys 2024 R1, and when I execute test.py, which load the existing project and tries to order the coil I get the same error as before
Hi Alfonso,
I tested your case with both 2024.1 and 2024.2 and I got a strange behavior.
If I open AEDT without touching the excitations and running the method as is:
project.oboundary.OrderCoilTerminals(["NAME:Primary_winding_parallel_0", "Primary_Parallel_0_Turn_0_copper_terminal", "Primary_Parallel_0_Turn_1_copper_terminal"])
I get the same error as you but if I manually change the order of the coils within AEDT and re-run the same line it works.
Still, If I change it back to the original order:
1) Primary_Parallel_0_Turn_0_copper_terminal
2) Primary_Parallel_0_Turn_1_copper_terminal
and run the same line it works.
Either is an issue with AEDT or the native API in both cases. Let me investigate further and I'll let you know. This will be useful anyway for the PyAEDT method implementation.
Kind regards,
Giulia
Before submitting the issue
Description of the bug
I am trying to run a command in Aedt for ordering the coil terminals, as it is not implemented in PyAedt.
When working with Transient A-Phi formulation and windings+coil terminals, Ansys requires that the coil be ordered. In the GUI that is done by right clicking in the winding and selecting Order Coil Terminals
I want to automate that in Python, so I recorded in IronPython while I did it in the GUI. I ended up with the following code:
If I try to run that exact command in Python, I tried:
But I get the following error:
Steps To Reproduce
Written down in the description
Which Operating System are you using?
Windows
Which Python version are you using?
3.11
Installed packages
annotated-types==0.7.0 ansys-pythonnet==3.1.0rc3 attrs==24.2.0 cffi==1.17.1 clr-loader==0.2.6 defusedxml==0.7.1 fonttools==4.54.1 fpdf2==2.8.1 jsonschema==4.23.0 jsonschema-specifications==2024.10.1 numpy==1.26.4 OpenMagneticsVirtualBuilder==0.5.4 pandas==2.2.3 pillow==10.4.0 plumbum==1.9.0 psutil==6.0.0 pyaedt==0.10.0 pycparser==2.22 pydantic==2.9.2 pydantic_core==2.23.4 pyedb==0.30.0 PyMKF @ file:///C:/Users/alfonso.martinez/Downloads/pymkf-0.9.13-cp311-cp311-win_amd64.whl#sha256=7d8cd7c1257a4bd0ca162449886122f4d7d3d5dc2e62801f6bfa18b3fb022e99
python-dateutil==2.9.0.post0 pytomlpp==1.0.13 pytz==2024.2 pywin32==307 PyYAML==6.0.2 referencing==0.35.1 rpds-py==0.20.0 rpyc==6.0.1 Rtree==1.3.0 scikit-rf==1.3.0 scipy==1.14.1 six==1.16.0 toml==0.10.2 typing_extensions==4.12.2 tzdata==2024.2