How to use scripting in HFSS to export the exact coordinates of any element as a csv format? #3911
-
How to use scripting in HFSS to export the exact coordinates of any element as a csv format? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@Zdaymen Not sure what you meant with exact coordinates, because for an sphere for instance, what is the exact coordinate? What you can obtain with PyAEDT is the bounding box of each object (referred to the Global CS), the center, the mass... you just need to get the object:
You can get the list of objects names: And then get the first object information: With this information, you will get the faces, vertices info... and finally you can export this information in a CSV using any python module like import csv: |
Beta Was this translation helpful? Give feedback.
@Zdaymen Not sure what you meant with exact coordinates, because for an sphere for instance, what is the exact coordinate?
What you can obtain with PyAEDT is the bounding box of each object (referred to the Global CS), the center, the mass... you just need to get the object:
hfss.modeler.objects
You can get the list of objects names:
names = hfss.modeler.objects.object_list
And then get the first object information:
hfss.modeler[names [0]]
With this information, you will get the faces, vertices info... and finally you can export this information in a CSV using any python module like import csv:
https://stackoverflow.com/questions/45549424/exporting-python-output-into-csv-or-text-file-be…