TAGGED: ansys-mapdl, changing-directory, directory, error, mapdl
-
-
October 29, 2021 at 10:47 am
manuel.uruena
SubscriberDear all,
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:
Traceback (most recent call last):
 File "
", line 1, in  File "C:UsersMANUELAppDataLocalProgramsPythonPython37libsite-packagesansysmapdlcore\_commandssolutionanalysis_options.py", line 3277, in solve
  return self.run(command, **kwargs)
 File "C:UsersMANUELAppDataLocalProgramsPythonPython37libsite-packagesansysmapdlcoremapdl.py", line 1898, in run
  text = self._run(command, **kwargs)
 File "C:UsersMANUELAppDataLocalProgramsPythonPython37libsite-packagesansysmapdlcoremapdl_corba.py", line 334, in _run
  text = self._server.executeCommandToString(command)
 File "C:UsersMANUELAppDataLocalProgramsPythonPython37libsite-packagesansys_corbaICoMapdlUnit_idl.py", line 206, in executeCommandToString
  return self._obj.invoke("executeCommandToString", _0_AAS_CORBA.MAPDL.Solvers.ICoMapdlUnit._d_executeCommandToString, args)
AAS_CORBA.MAPDL.Exceptions.EAnsysUnknown: AAS_CORBA.MAPDL.Exceptions.EAnsysUnknown(code=-15, description='Low-level communication error -15: Connection was closed', scope='MAPDL', interfaceName='ICoMapdlUnit', operation='executeCommand', moreInfo='SOLVE,')
How can I change the working directory and solve the model without this error?
November 10, 2021 at 12:09 ammrife
Ansys EmployeeHi @muruep it seems that you are using PyMAPDL...is that correct? If so what version of MAPDL and PyMAPDL are you using? What was the exact command issued? And what is the path you are using for the new working directory?
Mike
November 10, 2021 at 2:12 pmmanuel.uruena
SubscriberYes, I solved it with the command:
mapdl = launch_mapdl(run_location='C:\\APDL')
Thanks
November 10, 2021 at 3:00 pmmrife
Ansys EmployeeHi @muruep please provide the version of PyMAPDL and MAPDL that you are using.
MIke
Viewing 3 reply threads- The topic ‘Change working directory, solve and save files?’ is closed to new replies.
Ansys Innovation SpaceTrending discussions- The legend values are not changing.
- LPBF Simulation of dissimilar materials in ANSYS mechanical (Thermal Transient)
- Convergence error in modal analysis
- APDL, memory, solid
- How to model a bimodular material in Mechanical
- Meaning of the error
- Simulate a fan on the end of shaft
- Nonlinear load cases combinations
- Real Life Example of a non-symmetric eigenvalue problem
- How can the results of Pressures and Motions for all elements be obtained?
Top Contributors-
3862
-
1414
-
1221
-
1118
-
1015
Top Rated Tags© 2025 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
-