


{"id":45731,"date":"2020-07-02T09:54:59","date_gmt":"2020-07-02T09:54:59","guid":{"rendered":"\/forum\/forums\/topic\/how-to-get-recently-used-files-from-act-in-workbench\/"},"modified":"2020-07-02T09:54:59","modified_gmt":"2020-07-02T09:54:59","slug":"how-to-get-recently-used-files-from-act-in-workbench","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/how-to-get-recently-used-files-from-act-in-workbench\/","title":{"rendered":"How to get &#8220;Recently used files&#8221; from ACT in Workbench"},"content":{"rendered":"<p>Hi,<\/p>\n<p><\/p>\n<p>Is any way to get list of &#8220;Recently used files&#8221; from ACT or in Workbench scripting console, besides manually digging in <span class=\"st\">%appdata%ANSYSvXXX<\/span>FileManagement.XML ?<\/p>\n<p><\/p>\n<p>What is my reason: Simple. My projects are located in deep path which is not shown in detail inside Workbench GUI&gt;Files, but it is crucial for me to know what path these files are located. My paths are names of general projects, and files names have details on contents.<\/p>\n<p><\/p>\n<p>EDIT&#8230;: <br \/>my paths are e.g. <img decoding=\"async\" src=\"\/angry.gif\" width=\"\" height=\"\" alt=\"D:\" title=\"D:\" class=\"bbcode_smiley\" \/>\\Project_2020\\EFA\\OPT\\1_solve\\EFA1_rod_optimisation_PDM20200322_R19.wbpj<\/p>\n<p><\/p>\n<p>So i made not&nbsp; an solution myself as follows.<\/p>\n<p><\/p>\n<p>## based on https:\/\/stackoverflow.com\/questions\/15086674\/ironpython-xml-reader-in-net-2-0 probably HFSS<br \/>## sys.version &#8216;2.7.4 (IronPython 2.7.4 (2.7.0.40) on .NET 4.0.30319.42000 (64-bit))&#8217;<\/p>\n<p><\/p>\n<p>import xml.etree.ElementTree as ET<br \/>PATH_IN = &#8220;C:\\Users\\zws\\AppData\\RoamingAnsys\\v190\\UserRegFiles_2027930923\\FileManagement.XML&#8221;<br \/>&nbsp;import xml.etree.ElementTree as ET<\/p>\n<p>tree = ET.parse(PATH_IN)<br \/>root = tree.getroot()<\/p>\n<p>if 1==2:<br \/>&nbsp;&nbsp;&nbsp; print tree._root.tag<br \/>&nbsp;&nbsp;&nbsp; print tree._root._children[0].tag<br \/>&nbsp;&nbsp;&nbsp; print tree._root._children[0].keys() # <br \/>&nbsp;&nbsp;&nbsp; print tree._root._children[0]._children[0]._children[0]._children[0].tag #<br \/>&nbsp;&nbsp;&nbsp; print tree._root._children[0]._children[0]._children[0]._children[0]._children[0].keys() # <br \/>&nbsp;&nbsp;&nbsp; print tree._root._children[0]._children[0]._children[0]._children[0]._children[0].get(&#8216;Value&#8217;)<\/p>\n<p>vlst_ = tree._root._children[0]._children[0]._children[0]._children[0]._children[0].get(&#8216;Value&#8217;)<\/p>\n<p>for i in zip(range(100),<strike>):<br \/>&nbsp;&nbsp;&nbsp; print i<\/p>\n<p><\/p>\n<p>&nbsp;<\/p>\n<p><\/p>\n<p>&nbsp;<\/p>\n<p><\/strike><\/p>\n","protected":false},"template":"","class_list":["post-45731","topic","type-topic","status-closed","hentry"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_old_topic_id":["17913"],"_bbp_old_topic_author_name_id":["Anonymous"],"_bbp_old_is_topic_anonymous_id":["false"],"_bbp_old_closed_status_id":["publish"],"_bbp_author_ip":[null],"_bbp_old_sticky_status_id":["normal"],"_bbp_likes_count":["0"],"_btv_view_count":["663"],"_bbp_subscription":["247649"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["45731"],"_bbp_forum_id":["27791"],"_bbp_engagement":["25","173396"],"_bbp_voice_count":["2"],"_bbp_reply_count":["2"],"_bbp_last_reply_id":["120813"],"_bbp_last_active_id":["120813"],"_bbp_last_active_time":["2020-07-09 12:20:29"]},"test":"psiedlac123"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/45731","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\/45731\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=45731"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}