Skip to content

Commit

Permalink
DOCS: Update docs with new api (#1000)
Browse files Browse the repository at this point in the history
Co-authored-by: pyansys-ci-bot <[email protected]>
  • Loading branch information
dipinknair and pyansys-ci-bot authored Dec 11, 2024
1 parent 4b809be commit 8517e6c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
1 change: 1 addition & 0 deletions doc/changelog.d/1000.documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update docs with new api
29 changes: 26 additions & 3 deletions doc/source/getting_started/running_mechanical.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,17 @@ default port (``10000``), you would use this code to connect to it with this cod
mechanical = Mechanical()
Alternatively, you can use the
`connect_to_mechanical() <../api/ansys/mechanical/core/mechanical/index.html#mechanical.connect_to_mechanical>`_
for same functionality.

.. code:: python
from ansys.mechanical.core import connect_to_mechanical
mechanical = connect_to_mechanical()
Now assume that a remote instance of Mechanical has been started in server mode. To connect to
the computer on your local area network that is running Mechanical, you can use either
an IP address and port or a hostname and port.
Expand All @@ -138,6 +149,12 @@ You would connect to it with this code:
mechanical = Mechanical("192.168.0.1", port=10000)
or

.. code:: python
mechanical = connect_to_mechanical("192.168.0.1", port=10000)
**Hostname and port**

Assume that Mechanical is running remotely at hostname ``myremotemachine`` on port ``10000``.
Expand All @@ -148,6 +165,12 @@ You would connect to it with this code:
mechanical = Mechanical("myremotemachine", port=10000)
or

.. code:: python
mechanical = connect_to_mechanical("myremotemachine", port=10000)
Launching issues
----------------

Expand Down Expand Up @@ -204,9 +227,9 @@ Open a terminal and run the following command:
If the preceding command for your operating system doesn't launch Mechanical, you might have
a variety of issues, including:

- License server setup
- Running behind a VPN
- Missing dependencies
- License server setup
- Running behind a VPN
- Missing dependencies

Embed a Mechanical instance
---------------------------
Expand Down

0 comments on commit 8517e6c

Please sign in to comment.