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/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/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 --------------------------- 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",