Replies: 1 comment 2 replies
-
Hi @kwheeler9 , Thanks for opening the discussion. Please redirect your question to Ansys Developer Forum for Mechanical. There are many posts there that would help you since this is related to Mechanical scripting rather than PyMechanical. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I wrote a script that imports a geometry file and generates a mesh. I then need it to export the mesh as a .msh file and need help figuring out how to do that. I found the Mesh.SaveMeshToFileHelper() function by using dir(Mesh), and by using inspect.getfullargspec(mesh.SaveMeshToFileHelper) I've found that it has two arguments, 'filePath' and 'type'. So I tried the following:
mesh.SaveMeshToFileHelper(output_file, ".msh")
but I keep getting an error, "No method matches given arguments for Mesh.SaveMeshToFileHelper()".
I also get an error if I try to check the arguments allowed for 'type' with this:
print(mesh.SaveMeshToFileHelper.type.allowed_values())
which gives "'MethodBinding' object has no attribute 'type'"
Can anyone confirm first if the function I'm trying to use can export mesh files as .msh, and if so what the proper useage is for it?
And if this is the wrong function for exporting meshes, what would the correct way be? I'm using Ansys Mechanical 2024 r2.
Thank you,
Kyle
Beta Was this translation helpful? Give feedback.
All reactions