Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When editing pyaedt code, add the appropriate syntax completion. #5867

Open
chs513 opened this issue Mar 5, 2025 · 2 comments
Open

When editing pyaedt code, add the appropriate syntax completion. #5867

chs513 opened this issue Mar 5, 2025 · 2 comments
Labels
enhancement New features or code improvements

Comments

@chs513
Copy link

chs513 commented Mar 5, 2025

Description of the current limitations

For example, midpoint attritube for edge.midpoint, position attribute for vertice.position, center attritube for box.top_face_x.center.

ipk.materials['Copper'].specific_heat.value, myMaterial.thermal_conductivity, myMaterial.specific_heat, and myMaterial.density need syntax completion, too.

Code sample expected

from ansys.aedt.core import Icepak
ipk = Icepak()
box = ipk.modeler.create_box([0,0,0],[1,2,3])

for edge in box.edges:
print('Edge Midpoint = ', edge.midpoint)

for vertice in box.top_face_x.vertices:
print('Vertics =', vertice.position)

print('Face center = ', box.top_face_x.center)

print(ipk.materials['Copper'].specific_heat.value)
print(ipk.materials['Copper'].thermal_conductivity.value)
print(ipk.materials['Copper'].mass_density.value)

myMaterial = ipk.materials.add_material(name='chs_test1')
myMaterial.thermal_conductivity = 0.5
myMaterial.specific_heat = 200
myMaterial.mass_density = 300

print('thermal conductivity = ', ipk.materials[myMaterial.name].thermal_conductivity.value)

Useful links and references

No response

@chs513 chs513 added the enhancement New features or code improvements label Mar 5, 2025
@Samuelopez-ansys
Copy link
Member

Hi @chs513 , please could you specify what are you missing in your description? Thanks

@chs513
Copy link
Author

chs513 commented Mar 7, 2025

Hi @Samuelopez-ansys Some properties can not be syntax completed by editor, such as midpoint attritube for edge.midpoint, position attribute for vertice.position, center attritube for box.top_face_x.center. Could you please solve the problem? If you can, it would be very convenient for programming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or code improvements
Projects
None yet
Development

No branches or pull requests

2 participants