Skip to content

Commit

Permalink
Doc/ Adding 'exec' keyword info to documentation (#793)
Browse files Browse the repository at this point in the history
* Added info

* Restructuring.
  • Loading branch information
germa89 authored Dec 27, 2021
1 parent 6a2ba5a commit ab900f8
Showing 1 changed file with 30 additions and 1 deletion.
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

0 comments on commit ab900f8

Please sign in to comment.