


{"id":163534,"date":"2021-10-29T10:47:14","date_gmt":"2021-10-29T10:47:14","guid":{"rendered":"\/forum\/forums\/topic\/change-working-directory-solve-and-save-files\/"},"modified":"2021-11-10T15:00:08","modified_gmt":"2021-11-10T15:00:08","slug":"change-working-directory-solve-and-save-files","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/change-working-directory-solve-and-save-files\/","title":{"rendered":"Change working directory, solve and save files?"},"content":{"rendered":"<div class=\"Item-Body\">\n<div class=\"Message userContent\">\n<p>Dear all,<\/p>\n<p>I am running APDL in Python with mapdl for a stub column test. Every time I run my code in Python, all files created at the solution are saved into a temporary file created each time in AppData\/Local with a different name. I need to call some of these saved files (file.rst, database.db) in my code, so I try to change the working directory for Python and for APDL by the \/CWD command. But when I change my working directory, it no longer solves and displays this error:<\/p>\n<p>Traceback (most recent call last):<\/p>\n<p>&nbsp;File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<\/p>\n<p>&nbsp;File &quot;C:UsersMANUELAppDataLocalProgramsPythonPython37libsite-packagesansysmapdlcore\\_commandssolutionanalysis_options.py&quot;, line 3277, in solve<\/p>\n<p>&nbsp;&nbsp;return self.run(command, **kwargs)<\/p>\n<p>&nbsp;File &quot;C:UsersMANUELAppDataLocalProgramsPythonPython37libsite-packagesansysmapdlcoremapdl.py&quot;, line 1898, in run<\/p>\n<p>&nbsp;&nbsp;text = self._run(command, **kwargs)<\/p>\n<p>&nbsp;File &quot;C:UsersMANUELAppDataLocalProgramsPythonPython37libsite-packagesansysmapdlcoremapdl_corba.py&quot;, line 334, in _run<\/p>\n<p>&nbsp;&nbsp;text = self._server.executeCommandToString(command)<\/p>\n<p>&nbsp;File &quot;C:UsersMANUELAppDataLocalProgramsPythonPython37libsite-packagesansys_corbaICoMapdlUnit_idl.py&quot;, line 206, in executeCommandToString<\/p>\n<p>&nbsp;&nbsp;return self._obj.invoke(&quot;executeCommandToString&quot;, _0_AAS_CORBA.MAPDL.Solvers.ICoMapdlUnit._d_executeCommandToString, args)<\/p>\n<p>AAS_CORBA.MAPDL.Exceptions.EAnsysUnknown: AAS_CORBA.MAPDL.Exceptions.EAnsysUnknown(code=-15, description=&#039;Low-level communication error -15: Connection was closed&#039;, scope=&#039;MAPDL&#039;, interfaceName=&#039;ICoMapdlUnit&#039;, operation=&#039;executeCommand&#039;, moreInfo=&#039;SOLVE,&#039;)<\/p>\n<p><\/p>\n<\/p>\n<p>How can I change the working directory and solve the model without this error?<\/p>\n","protected":false},"template":"","class_list":["post-163534","topic","type-topic","status-closed","hentry","topic-tag-ansys-mapdl-1","topic-tag-changing-directory-1","topic-tag-directory","topic-tag-error","topic-tag-mapdl"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_author_ip":[""],"_bbp_old_reply_author_name_id":["Anonymous"],"_bbp_old_is_reply_anonymous_id":["false"],"_btv_view_count":["3240"],"_bbp_likes_count":["0"],"_bbp_subscription":["237675"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["163534"],"_bbp_forum_id":["27791"],"_bbp_engagement":["18229","237675"],"_bbp_voice_count":["2"],"_bbp_reply_count":["3"],"_bbp_last_reply_id":["196285"],"_bbp_last_active_id":["196285"],"_bbp_last_active_time":["2021-11-10 15:00:08"]},"test":"manuel-uruenaalumnos-upm-es"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/163534","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\/163534\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=163534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}