Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc/ Adding 'exec' keyword info to documentation #793

Merged
merged 2 commits into from
Dec 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion doc/source/user_guide/launcher.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ the :func:`launch_mapdl() <ansys.mapdl.core.launch_mapdl>`:

.. code:: python

from ansys.mapdl import launch_mapdl
from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl()

Python will automatically attempt to detect your MAPDL binary based on
Expand Down Expand Up @@ -38,6 +38,35 @@ the path again. If you need to change the default ansys path

Also see :func:`change_default_ansys_path() <ansys.mapdl.core.change_default_ansys_path>` and :func:`find_ansys() <ansys.mapdl.core.launcher.find_ansys>`.

Additionally, it is possible to specify the executable using the keyword argument ``exec_file``.
In Linux:

.. code:: python

from ansys.mapdl.core import launch_mapdl

mapdl = launch_mapdl(exec_file='/usr/ansys_inc/v212/ansys/bin/ansys212')


And in Windows:

.. code:: python

from ansys.mapdl.core import launch_mapdl

mapdl = launch_mapdl(exec_file='C://Program Files//ANSYS Inc//v212//ANSYS//bin//winx64//ansys212.exe')

You could also specify a custom executable by adding the correspondent flag (``-custom``) to the additional switches keyword argument.

.. code:: python

from ansys.mapdl.core import launch_mapdl

custom_exec = '/usr/ansys_inc/v212/ansys/bin/ansys212t'
add_switch = f" -custom {custom_exec}"
mapdl = launch_mapdl(additional_switches=add_switch)



API Reference
~~~~~~~~~~~~~
Expand Down