ansys / pymotorcad

https://motorcad.docs.pyansys.com
MIT License
13 stars 1 forks source link

.keep_instance_open=True is not available #296

Open ShinsukeOkayasu opened 2 months ago

ShinsukeOkayasu commented 2 months ago

πŸ” Before submitting the issue

🐞 Description of the bug

the Motor-CAD instance is closed after calculation automatically, even if i add "mcApp = pymotorcad.MotorCAD(keep_instance_open=True)" test_script_default_keep_open.zip

I attached sample mot and py. I executed py by visual studio Code.

πŸ“ Steps to reproduce

I tried and Motor-CAD script just do static thermal analysis to check the result after automatic calculation by python script. I set pymotorcad as below. mcApp = pymotorcad.MotorCAD(keep_instance_open=True)

but the Motor-CAD instance is closed after calculation.

πŸ’» Which operating system are you using?

Windows

πŸ“€ Which ANSYS version are you using?

Motor-CAD 24R1

🐍 Which Python version are you using?

3.10

πŸ“¦ Installed packages

ansys-motorcad-core==0.4.3
certifi==2023.7.22
cffi==1.15.1
charset-normalizer==3.3.2
clr-loader==0.2.6
contourpy==1.1.0
cycler==0.11.0
EasyProcess==1.1
entrypoint2==1.1
fonttools==4.42.1
idna==3.4
importlib-metadata==6.8.0
kiwisolver==1.4.5
matplotlib==3.7.3
MouseInfo==0.1.3
mss==9.0.1
numpy==1.25.2
packaging==23.1
pandas==2.1.0
Pillow==10.0.0
plumbum==1.8.2
psutil==5.9.5
pyaedt==0.6.92
PyAutoGUI==0.9.54
pycparser==2.21
PyGetWindow==0.0.9
PyMsgBox==1.0.9
pyparsing==3.1.1
pyperclip==1.8.2
PyRect==0.2.0
pyscreenshot==3.1
PyScreeze==0.1.29
python-dateutil==2.8.2
pythonnet==3.0.2
pytweening==1.0.7
pytz==2023.3.post1
pywin32==306
requests==2.31.0
rpyc==5.3.1
scipy==1.11.3
six==1.16.0
tzdata==2023.3
urllib3==2.0.7
zipp==3.17.0
ShinsukeOkayasu commented 2 months ago

Resolved this issue.

I add time.sleep after open Motor-CAD instance.

Added_import_subprocess_2.zip