


{"id":397172,"date":"2024-12-11T20:40:16","date_gmt":"2024-12-11T20:40:16","guid":{"rendered":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/location-of-results-when-using-python-or-cmd-to-call-ls-run-to-calculate-k-files\/"},"modified":"2024-12-11T20:40:16","modified_gmt":"2024-12-11T20:40:16","slug":"location-of-results-when-using-python-or-cmd-to-call-ls-run-to-calculate-k-files","status":"publish","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/location-of-results-when-using-python-or-cmd-to-call-ls-run-to-calculate-k-files\/","title":{"rendered":"Location of results when using python or cmd to call ls-run to calculate k files"},"content":{"rendered":"<p>&lt;p&gt;Path problem of simulation result files when using python or cmd to call ls-run to calculate k files&lt;\/p&gt;&lt;p&gt;Hello,&lt;\/p&gt;&lt;p&gt;I aim to write a Python script to sequentially run <code>.k<\/code> files located in multiple subfolders within the current directory. To achieve this, I plan to use Python to invoke the <code>LS-Run<\/code> command for executing the <code>.k<\/code> files. However, I am facing an issue: although the <code>.k<\/code> files are located in different subfolders, the result files generated by the program are always saved in the current directory. Unfortunately, I could not find any option in the <code>LS-Run<\/code> keywords to specify the output file directory.&lt;br&gt;&lt;br&gt;Here is the code for running the .k files:&lt;br&gt;<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2024\/12\/11-12-2024-1733949413-mceclip0.png\" \/>&lt;\/p&gt;&lt;p&gt;<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2024\/12\/11-12-2024-1733949557-mceclip1.png\" \/>&lt;\/p&gt;<\/p>\n","protected":false},"template":"","class_list":["post-397172","topic","type-topic","status-publish","hentry","topic-tag-ls_dyna-1"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_forum_id":["27814"],"_bbp_topic_id":["397172"],"_bbp_subscription":["22672","13694"],"_bbp_author_ip":["128.163.238.205"],"_bbp_last_reply_id":["397918"],"_bbp_last_active_id":["397918"],"_bbp_last_active_time":["2024-12-18 19:53:59"],"_bbp_reply_count":["8"],"_bbp_reply_count_hidden":["0"],"_bbp_voice_count":["2"],"_bbp_engagement":["22672","13694"],"_btv_view_count":["584"],"_bbp_topic_status":["unanswered"],"_bbp_notification_enabled":["22672"]},"test":"rji229uky-edu"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/397172","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\/397172\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=397172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}