ansys / pymechanical

Pythonic interface to Ansys Mechanical β„’
https://mechanical.docs.pyansys.com/
MIT License
36 stars 18 forks source link

Issue saving file when provided path #307

Closed klmcadams closed 1 year ago

klmcadams commented 1 year ago

πŸ” Before submitting the issue

🐞 Description of the bug

Issue saving mechdat file given path:

CRITICAL - - logging - handle_exception - Uncaught exception Traceback (most recent call last): File "", line 1, in File "C:...\ansys\mechanical\core\embedding\app.py", line 107, in save self.DataModel.Project.Save(path)

System.Exception: Failed to save project: System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component. at Ansys.Common.Interop.AnsysWB.IWBAppletList.get_Applet(String bsName) at Ansys.ACT.Mechanical.Standalone.AddtoRecentFiles(String filePath) at Ansys.ACT.Mechanical.Standalone.SaveAs(String filePath) at Ansys.ACT.Automation.Mechanical.Project.SaveAs(String filePath) at Ansys.ACT.Automation.Mechanical.Project.LogAndThrow(String filePath) at Ansys.ACT.Automation.Mechanical.Project.SaveAs(String filePath) at Ansys.ACT.Automation.Mechanical.Project.Save(String filePath)

πŸ“ Steps to reproduce

import os from ansys.mechanical.core import App, global_variables

app = App(version=241) globals().update(global_variables(app)) print(app)

path = r"C:...\generic_241.mechdat" app.save(path)

πŸ’» Which operating system are you using?

Windows

πŸ“€ Which ANSYS version are you using?

2024R1

🐍 Which Python version are you using?

3.10

πŸ“¦ Installed packages

N/A
koubaa commented 1 year ago

@klmcadams try this with the next available 241 build, the issue should be fixed

klmcadams commented 1 year ago

This issue is fixed