ansys / pymechanical

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

Version number ignored in launch_mechanical #816

Closed pmaroneh closed 2 months ago

pmaroneh commented 2 months ago

🔍 Before submitting the issue

🐞 Description of the bug

Version number is ignored in launch_mechanical:

mechanical = launch_mechanical(batch=False, cleanup_on_exit=False, version='242')
print(mechanical)

opens 2023R2. I also tried '241' as argument as well as passing ints instead of strings.

📝 Steps to reproduce

See above.

💻 Which operating system are you using?

Windows

📀 Which ANSYS version are you using?

I'd like to use 24R2. Version 232 is used instead.

🐍 Which Python version are you using?

3.10

📦 Installed packages

Package                               Version
------------------------------------- --------
ansys-api-mechanical                  0.1.2
ansys-api-platform-instancemanagement 1.1.0
ansys-mechanical-core                 0.11.1
ansys-mechanical-env                  0.1.6
ansys-platform-instancemanagement     1.1.2
ansys-pythonnet                       3.1.0rc3
ansys-tools-path                      0.6.0
appdirs                               1.4.4
cffi                                  1.16.0
click                                 8.1.7
clr-loader                            0.2.6
colorama                              0.4.6
grpcio                                1.64.1
importlib_metadata                    8.0.0
pip                                   22.3.1
platformdirs                          4.2.2
protobuf                              5.27.2
pycparser                             2.22
setuptools                            65.5.0
tqdm                                  4.66.4
zipp                                  3.19.2
dipinknair commented 2 months ago

@pmaroneh , Correct argument for running different version of Mechanical with Remote mode is to use exec_file argument. Version argument should be used only if PyPIM is configured.

Docs - https://mechanical.docs.pyansys.com/version/0.11/api/ansys/mechanical/core/mechanical/index.html#mechanical.launch_mechanical

exec_file_path = 'C:/Program Files/ANSYS Inc/v242/aisol/bin/win64/AnsysWBU.exe'
mechanical = launch_mechanical(exec_file_path=exec_file_path , batch=False, cleanup_on_exit=False)
pmaroneh commented 2 months ago

Thanks @dipinknair Could we make this more explicit in the doc? Thanks