


{"id":364517,"date":"2024-04-27T10:37:12","date_gmt":"2024-04-27T10:37:12","guid":{"rendered":"\/forum\/forums\/reply\/364517\/"},"modified":"2024-04-28T22:33:52","modified_gmt":"2024-04-28T22:33:52","slug":"364517","status":"publish","type":"reply","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/364517\/","title":{"rendered":"Reply To: How to automatically export .csv or .xls after solving each design point?"},"content":{"rendered":"<p>&lt;p&gt;&nbsp;&lt;\/p&gt;&lt;p&gt;&nbsp;&lt;\/p&gt;&lt;p&gt;&nbsp;&lt;\/p&gt;&lt;p&gt;&nbsp;&lt;\/p&gt;&lt;p&gt;Thank you, Mr. Pandey, but I am not allowed to install additional extensions at the moment.&lt;\/p&gt;&lt;p&gt;Thank you, Mr. Kostson. Your information did help! Now I can export a text file after solving using &ldquo;result.ExportToTextFile(export_name+&rsquo;.txt&rsquo;)&rdquo; in the postprocessing section:&lt;\/p&gt;&lt;p&gt;<img decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2024\/04\/27-04-2024-1714212816-blobid0.png\" \/>&lt;\/p&gt;&lt;p&gt;Q1:&lt;br&gt;However, the exported txt files for each design point (dp) are the same.&nbsp;&lt;\/p&gt;&lt;p&gt;For example, if I have 3 design points, it can output 3 txt files after solving (the txt file names are different by adding system time), but all 3 txt files contain the same data, which belongs to the current design point. That is, no matter how many design points it solves, Ansys Mechanical only exports one design point&rsquo;s data.&lt;\/p&gt;&lt;p&gt;Q2:&lt;\/p&gt;&lt;p&gt;May I ask if the design point parameters can be retrieved in the &ldquo;Python Code&rdquo; object?&lt;\/p&gt;&lt;p&gt;Since there are many design points, it would be nice if Mechanical could export results with parameters in the file names. For example:&lt;\/p&gt;&lt;p&gt;&rdquo;force_1N_pressure_1Pa_stress.txt&rdquo; or &ldquo;force_5N_length_1m_directional deformation.txt&rdquo;&lt;\/p&gt;&lt;p&gt;I have searched and got this information, which says we can access model settings using Python APIs:<img decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2024\/04\/27-04-2024-1714213256-mceclip2.png\" \/>&lt;\/p&gt;&lt;p&gt;So I have tried many attributes, but couldn&rsquo;t find anyone that worked. The closest attribute I&rsquo;ve found is &ldquo;GetParameter&rdquo;, but it still didn&rsquo;t help.&lt;\/p&gt;&lt;p&gt;<img decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2024\/04\/27-04-2024-1714214118-mceclip3.png\" \/>&lt;\/p&gt;&lt;p&gt;Thank you very much for any help!&lt;\/p&gt;&lt;p&gt;&nbsp;&lt;\/p&gt;&lt;p&gt;&nbsp;&lt;\/p&gt;&lt;p&gt;&nbsp;&lt;\/p&gt;<\/p>\n","protected":false},"template":"","class_list":["post-364517","reply","type-reply","status-publish","hentry"],"aioseo_notices":[],"acf":[],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/364517","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/reply"}],"version-history":[{"count":4,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/364517\/revisions"}],"predecessor-version":[{"id":364591,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/364517\/revisions\/364591"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=364517"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}