Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
Ansys Free Student Software

Ansys Free Student Software

Topics cover installation and configuration of our free student products.

How to extract time-history data from Named Selections via Python?

    • milagrosisbell723
      Subscriber

      Hello,

      I'm running a parametric study in Ansys Workbench 2025 R2 using Parameter Sets, and I need a reliable way to export result data. For each Design Point, I want to export the full time-history data (Force and Deformation for every substep) to a CSV or TXT file.

      Setup
      Geometry is regenerated in SpaceClaim for every Design Point, so topology changes between runs.
      Because of this, all result scoping is done through Named Selections only.
      I tested both:
      User Defined Results (Expression = UY)
      Deformation Probes
      Data export is handled through a Python Code object in Mechanical using the After Post callback.

      Problem: When I run the Design Points, Mechanical runs in the background (GUI is closed). Because the GUI is closed, calling resultado.TabularData or using resultado.ExportToTextFile() throws an error (e.g., 'UserDefinedResult' object has no attribute 'TabularData' or Index out of range). The API seems to disable tabular extraction for these objects when running in batch mode.

      What’s the simplest and most robust method to extract time-history data from Named Selections using Python while Mechanical is running in background mode?

      Any suggestions, examples, or code snippets would be hugely appreciated. Thanks!

Viewing 0 reply threads
  • You must be logged in to reply to this topic.
[bingo_chatbox]