General Mechanical

General Mechanical

Topics relate to Mechanical Enterprise, Motion, Additive Print and more

How to export the mesh to STL file all via script

    • GiScri
      Subscriber
      Hi all, nI'm trying to export the mesh in mechanical as STL file, without requiring any click from the user.nVia the Recording tool in the ACTConsole I've found the command context_menu.DoExportToSTLFile(ExtAPI), but this open the Save As window. nIs there a way to give via script a name and a file path and export to that, without requiring further user intervention?nTo me, it seems that the DoExportToSTLFile() is a wrapper for a ExportToSTLFile function, but scouting with the dir command all the mesh-related objects, I haven't managed to find any reference to a STL export...nMind that I am aware of Model.Geometry.ExportToSTL(path), but this is not what I need, since I need the local refinement of the mesh to be in place, while the aforementioned command export with a rough element size. I've also tried to reduce the max edge length via the STL export options, but this refines all the elements in the stl model, while I need the precision only in some locations.
    • Aniket
      Ansys Employee
    • GiScri
      Subscriber
      Thank you!!n
Viewing 2 reply threads
  • You must be logged in to reply to this topic.