From 4b809be8ded094de9b9eaf52ca5946ecb6e3a96c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2024 14:52:19 +0000 Subject: [PATCH 1/2] CHORE: Bump the doc group with 2 updates (#999) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> --- doc/changelog.d/999.maintenance.md | 1 + pyproject.toml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 doc/changelog.d/999.maintenance.md diff --git a/doc/changelog.d/999.maintenance.md b/doc/changelog.d/999.maintenance.md new file mode 100644 index 000000000..46cb383cb --- /dev/null +++ b/doc/changelog.d/999.maintenance.md @@ -0,0 +1 @@ +Bump the doc group with 2 updates \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 518675e5d..1cb5e535d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,14 +57,14 @@ tests = [ ] doc = [ "sphinx==8.1.3", - "ansys-sphinx-theme[autoapi]==1.2.2", + "ansys-sphinx-theme[autoapi]==1.2.3", "grpcio==1.68.1", "imageio-ffmpeg==0.5.1", "imageio==2.36.1", "jupyter_sphinx==0.5.3", "jupyterlab>=3.2.8", "matplotlib==3.9.3", - "numpy==2.1.3", + "numpy==2.2.0", "numpydoc==1.8.0", "pandas==2.2.3", "panel==1.5.4", From 8517e6c7ec08cd0e5dcf55e3423877b4029958cc Mon Sep 17 00:00:00 2001 From: Dipin <26918585+dipinknair@users.noreply.github.com> Date: Wed, 11 Dec 2024 13:16:19 -0600 Subject: [PATCH 2/2] DOCS: Update docs with new api (#1000) Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> --- doc/changelog.d/1000.documentation.md | 1 + .../getting_started/running_mechanical.rst | 29 +++++++++++++++++-- 2 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 doc/changelog.d/1000.documentation.md diff --git a/doc/changelog.d/1000.documentation.md b/doc/changelog.d/1000.documentation.md new file mode 100644 index 000000000..c8dc88271 --- /dev/null +++ b/doc/changelog.d/1000.documentation.md @@ -0,0 +1 @@ +Update docs with new api \ No newline at end of file diff --git a/doc/source/getting_started/running_mechanical.rst b/doc/source/getting_started/running_mechanical.rst index 84d58dee6..ac8c2773e 100644 --- a/doc/source/getting_started/running_mechanical.rst +++ b/doc/source/getting_started/running_mechanical.rst @@ -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. @@ -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``. @@ -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 ---------------- @@ -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 ---------------------------