Skip to content

Commit

Permalink
Improve documentation home page (#3659)
Browse files Browse the repository at this point in the history
* added files

* added files

* Refactored PyAEDT documentation home page

* Implemented suggestions

* Implemented suggestions

* merged

* fixed margins

* fixed margins

* fixed margins

* fixed margins

* fixed margins

* added 2 examples

* added 2 examples

* removed environment variables from init

---------

Co-authored-by: maxcapodi78 <Shark78>
Co-authored-by: Revathy Venugopal <[email protected]>
  • Loading branch information
maxcapodi78 and Revathyvenugopal162 authored Sep 28, 2023
1 parent 1173e32 commit 36f9966
Show file tree
Hide file tree
Showing 21 changed files with 1,165 additions and 275 deletions.
86 changes: 86 additions & 0 deletions doc/source/Getting_started/About.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
About PyAnsys and AEDT
======================

PyAnsys
-------

PyAEDT is part of the larger `PyAnsys <https://docs.pyansys.com>`_
effort to facilitate the use of Ansys technologies directly from Python.

PyAEDT is intended to consolidate and extend all existing
functionalities around scripting for AEDT to allow reuse of existing code,
sharing of best practices, and increased collaboration.


About AEDT
----------

`AEDT <https://www.ansys.com/products/electronics>`_ is a platform that enables true
electronics system design. AEDT provides access to the Ansys gold-standard
electro-magnetics simulation solutions, such as Ansys HFSS, Ansys Maxwell,
Ansys Q3D Extractor, Ansys Siwave, and Ansys Icepak using electrical CAD (ECAD) and
Mechanical CAD (MCAD) workflows.

In addition, AEDT includes direct links to the complete Ansys portfolio of thermal, fluid,
and mechanical solvers for comprehensive multiphysics analysis.
Tight integration among these solutions provides unprecedented ease of use for setup and
faster resolution of complex simulations for design and optimization.

.. image:: https://images.ansys.com/is/image/ansys/ansys-electronics-technology-collage?wid=941&op_usm=0.9,1.0,20,0&fit=constrain,0
:width: 800
:alt: AEDT Applications
:target: https://www.ansys.com/products/electronics


PyAEDT is licensed under the `MIT License
<https://github.com/ansys/pyaedt/blob/main/LICENSE>`_.

PyAEDT includes functionality for interacting with the following AEDT tools and Ansys products:

- HFSS and HFSS 3D Layout
- Icepak
- Maxwell 2D, Maxwell 3D, and RMXprt
- 2D Extractor and Q3D Extractor
- Mechanical
- Nexxim
- EDB
- Twin Builder


Dependencies
------------
To run PyAEDT, you must have a local licensed copy of AEDT.
PyAEDT supports AEDT versions 2022 R2 and later.

Student version
---------------

PyAEDT supports AEDT Student versions 2022 R2 and later. For more information, see the
`Ansys Electronics Desktop Student - Free Software Download <https://www.ansys.com/academic/students/ansys-e
lectronics-desktop-student>`_ page on the Ansys website.


Why PyAEDT?
-----------
A quick and easy approach for automating a simple operation in the
AEDT UI is to record and reuse a script. However, here are some disadvantages of
this approach:

- Recorded code is dirty and difficult to read and understand.
- Recorded scripts are difficult to reuse and adapt.
- Complex coding is required by many global users of AEDT.

Here are the main advantages that PyAEDT provides:

- Automatic initialization of all AEDT objects, such as desktop
objects like the editor, boundaries, and more
- Error management
- Log management
- Variable management
- Compatibility with IronPython (limited) and CPython
- Simplification of complex API syntax using data objects while
maintaining PEP8 compliance.
- Code reusability across different solvers
- Clear documentation on functions and API
- Unit tests of code to increase quality across different AEDT versions

127 changes: 127 additions & 0 deletions doc/source/Getting_started/Quickcode.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
Quick Code
==========

Documentation and issues
------------------------
Documentation for the latest stable release of PyAEDT is hosted at
`PyAEDT documentation <https://aedt.docs.pyansys.com/version/stable/>`_.

In the upper right corner of the documentation's title bar, there is an option
for switching from viewing the documentation for the latest stable release
to viewing the documentation for the development version or previously
released versions.

You can also view or download PyAEDT cheat sheets, which are one-page references
providing syntax rules and commands for using the PyAEDT API and PyEDB API:

- `View PyAEDT cheat sheet <https://cheatsheets.docs.pyansys.com/pyaedt_API_cheat_sheet.png>`_ or
`download PyAEDT cheat sheet <https://cheatsheets.docs.pyansys.com/pyaedt_API_cheat_sheet.pdf>`_ the
PyAEDT API cheat sheet.

- `View EDB cheat sheet <https://cheatsheets.docs.pyansys.com/pyedb_API_cheat_sheet.png>`_ or
`download EDB cheat sheet <https://cheatsheets.docs.pyansys.com/pyedb_API_cheat_sheet.pdf>`_ the
PyAEDT API cheat sheet.


On the `PyAEDT Issues <https://github.com/ansys/PyAEDT/issues>`_ page, you can
create issues to report bugs and request new features. On the `PyAEDT Discussions
<https://github.com/ansys/pyaedt/discussions>`_ page or the `Discussions <https://discuss.ansys.com/>`_
page on the Ansys Developer portal, you can post questions, share ideas, and get community feedback.

To reach the project support team, email `[email protected] <[email protected]>`_.


Example Workflow
----------------
Here’s a brief example of how PyAEDT works:

Connect to AEDT from a Python IDE
---------------------------------
PyAEDT works both inside AEDT and as a standalone app.
This Python library automatically detects whether it is running
in an IronPython or CPython environment and initializes AEDT accordingly.
PyAEDT also provides advanced error management. Usage examples follow.

Explicit AEDT declaration and error management
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: python
# Launch AEDT 2023 R1 in non-graphical mode
from pyaedt import Desktop, Circuit
with Desktop(specified_version="2023.1",
non_graphical=False, new_desktop_session=True,
close_on_exit=True, student_version=False):
circuit = Circuit()
...
# Any error here will be caught by Desktop.
...
# Desktop is automatically released here.
Implicit AEDT declaration and error management
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: python
# Launch the latest installed version of AEDT in graphical mode
from pyaedt import Circuit
with Circuit(specified_version="2023.1",
non_graphical=False) as circuit:
...
# Any error here will be caught by Desktop.
...
# Desktop is automatically released here.
Remote application call
~~~~~~~~~~~~~~~~~~~~~~~
You can make a remote application call on a CPython server
or any Windows client machine.

On a CPython server:

.. code:: python
# Launch PyAEDT remote server on CPython
from pyaedt.common_rpc import pyaedt_service_manager
pyaedt_service_manager()
On any Windows client machine:

.. code:: python
from pyaedt.common_rpc import create_session
cl1 = create_session("server_name")
cl1.aedt(port=50000, non_graphical=False)
hfss = Hfss(machine="server_name", port=50000)
# your code here
Variables
~~~~~~~~~

.. code:: python
from pyaedt.HFSS import HFSS
with HFSS as hfss:
hfss["dim"] = "1mm" # design variable
hfss["$dim"] = "1mm" # project variable
Modeler
~~~~~~~

.. code:: python
# Create a box, assign variables, and assign materials.
from pyaedt.hfss import Hfss
with Hfss as hfss:
hfss.modeler.create_box([0, 0, 0], [10, "dim", 10],
"mybox", "aluminum")
77 changes: 74 additions & 3 deletions doc/source/Getting_started/index.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,63 @@
.. _ref_getting_started:

===============
Getting started
===============

.. grid:: 2

.. grid-item-card:: About PyAnsys and AEDT
:link: About
:link-type: doc

Learn more about PyAnsys and Ansys Electronics Desktop.

.. grid-item-card:: Installation
:link: Installation
:link-type: doc
:margin: 2 2 0 0

Learn how to install PyAEDT from PyPi or conda.

.. grid-item-card:: Quick code
:link: Quickcode
:link-type: doc
:margin: 2 2 0 0

Here's a brief example of how PyAEDT works.

.. grid-item-card:: Client-Server
:link: ClientServer
:link-type: doc
:margin: 2 2 0 0

Launch PyAEDT on a client machine and control Electronics Desktop
on a remote server.

.. grid-item-card:: Versions and interfaces
:link: versioning
:link-type: doc
:margin: 2 2 0 0

Discover the compatibility between PyAEDT and Ansys AEDT versions.

.. grid-item-card:: Troubleshooting
:link: Troubleshooting
:link-type: doc
:margin: 2 2 0 0

Any questions? Refer to Q&A before submitting an issue.


What is PyAEDT?
---------------
PyAEDT is a Python library that interacts directly with the API for
Ansys Electronics Desktop (AEDT) to make scripting simpler. The architecture
for PyAEDT can be reused for all AEDT 3D products (HFSS, Icepak, Maxwell 3D,
and Q3D Extractor), 2D tools, and Ansys Mechanical. PyAEDT also provides
support for Circuit tools like Nexxim and system simulation tools like
Twin Builder. Finally, PyAEDT provides scripting capabilities in Ansys layout
tools like HFSS 3D Layout and EDB. The PyAEDT class and method structures
simplify operation while reusing information as much as possible across
the API.

To run PyAEDT, you must have a licensed copy of Ansys Electronics
Desktop (AEDT) installed.

Expand All @@ -25,6 +80,20 @@ For more information, see `Ansys Electronics <https://https://www.ansys.com/prod
on the Ansys website.


License
-------
PyAEDT is licensed under the MIT license.

PyAEDT makes no commercial claim over Ansys whatsoever. This library extends the
functionality of AEDT by adding a Python interface to AEDT without changing the
core behavior or license of the original software. The use of PyAEDT requires a
legally licensed local copy of AEDT.

To get a copy of AEDT, see the `Ansys Electronics <https://www.ansys.com/products/electronics>`_
page on the Ansys website.



.. toctree::
:hidden:
:maxdepth: 2
Expand All @@ -34,4 +103,6 @@ on the Ansys website.
ClientServer
versioning
Contributing
Quickcode
About

5 changes: 4 additions & 1 deletion doc/source/Getting_started/versioning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ The following table shows the supported versions of Ansys EDT and the recommende
| | +-----------------------+-----------------------+
| | | gRPC | COM |
+===========================+========================+=======================+=======================+
| AnsysEM 2024 R1 | gRPC | YES | NO* |
+---------------------------+------------------------+-----------------------+-----------------------+
| AnsysEM 2023 R2 | gRPC | YES | YES* |
+---------------------------+------------------------+-----------------------+-----------------------+
| AnsysEM 2023 R1 | gRPC | YES | YES* |
Expand All @@ -72,4 +74,5 @@ Where:

* YES means that the interface is supported and recommended.
* YES* means that the interface is supported, but not recommended. Their support might be dropped in the future.
* NO means that the interface is not supported.
* NO means that the interface is not supported.
* NO* means that the interface is still supported but it is deprecated.
Binary file added doc/source/_static/assets/index_api.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions doc/source/_static/assets/index_api.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/source/_static/assets/index_contribute.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions doc/source/_static/assets/index_contribute.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/source/_static/assets/index_examples.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions doc/source/_static/assets/index_examples.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 36f9966

Please sign in to comment.