


{"id":458502,"date":"2026-05-20T04:40:27","date_gmt":"2026-05-20T04:40:27","guid":{"rendered":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/how-to-extract-time-history-data-from-named-selections-via-python\/"},"modified":"2026-05-20T04:40:27","modified_gmt":"2026-05-20T04:40:27","slug":"how-to-extract-time-history-data-from-named-selections-via-python","status":"publish","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/how-to-extract-time-history-data-from-named-selections-via-python\/","title":{"rendered":"How to extract time-history data from Named Selections via Python?"},"content":{"rendered":"<p>&lt;p&gt;Hello,&lt;\/p&gt;&lt;p&gt;I&#8217;m running a parametric study in Ansys Workbench 2025 R2 using Parameter Sets, and I need a reliable way to export result data.&nbsp;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.&lt;\/p&gt;&lt;p&gt;Setup&lt;br&gt;Geometry is regenerated in SpaceClaim for every Design Point, so topology changes between runs.&lt;br&gt;Because of this, all result scoping is done through Named Selections only.&lt;br&gt;I tested both:&lt;br&gt;User Defined Results (Expression = UY)&lt;br&gt;Deformation Probes&lt;br&gt;Data export is handled through a Python Code object in Mechanical using the After Post callback.&lt;\/p&gt;&lt;p&gt;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., &#8216;UserDefinedResult&#8217; object has no attribute &#8216;TabularData&#8217; or Index out of range). The API seems to disable tabular extraction for these objects when running in batch mode.&lt;\/p&gt;&lt;p&gt;What&rsquo;s the simplest and most robust method to extract time-history data from Named Selections using Python while Mechanical is running in background mode?&lt;\/p&gt;&lt;p&gt;Any suggestions, examples, or code snippets would be hugely appreciated. Thanks!&lt;\/p&gt;<\/p>\n","protected":false},"template":"","class_list":["post-458502","topic","type-topic","status-publish","hentry"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_forum_id":["27784"],"_bbp_topic_id":["458502"],"_bbp_author_ip":["14.177.124.246"],"_bbp_last_reply_id":["0"],"_bbp_last_active_id":["458502"],"_bbp_last_active_time":["2026-05-20 04:40:27"],"_bbp_reply_count":["0"],"_bbp_reply_count_hidden":["0"],"_bbp_voice_count":["1"],"_bbp_engagement":["689689"],"_btv_view_count":["10"],"_bbp_topic_status":["unanswered"]},"test":"milagrosisbell723hotmail-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/458502","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/458502\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=458502"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}