Skip to content

Commit 0d099fb

Browse files
Samuelopez-ansysDevin-CrawfordPipKat
authored
DOCS: Add extensions documentation (#4850)
Co-authored-by: Devin <[email protected]> Co-authored-by: Kathy Pippert <[email protected]>
1 parent 369ed4a commit 0d099fb

File tree

8 files changed

+100
-2
lines changed

8 files changed

+100
-2
lines changed

doc/source/Getting_started/Installation.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ The user can select the AEDT application to install the specific workflow.
6565
:width: 400
6666
:alt: PyAEDT toolkit manager 2
6767

68+
For additional information about AEDT extensions,
69+
see `Extensions <https://aedt.docs.pyansys.com/version/stable/User_guide/extensions.html>`_.
70+
6871

6972
Install on CPython from PyPI
7073
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
110 Bytes
Loading

doc/source/User_guide/extensions.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Extensions
2+
==========
3+
4+
Extensions provide a simplified interface to perform automated workflows in AEDT.
5+
In AEDT, you can use the Extension Manager to add or remove extensions.
6+
For more information, see `Extension Manager <https://aedt.docs.pyansys.com/version/stable/Getting_started/Installation.html#extension-manager>`_.
7+
8+
Extensions are generally tool-specific and are therefore only accessible given the appropriate context. The following sections provide further clarification.
9+
10+
You can launch extensions in standalone mode from the console or a Python script.
11+
12+
Project extensions
13+
==================
14+
15+
Project extension apply to all extensions that are applicable for all AEDT applications.
16+
17+
.. grid:: 2
18+
19+
.. grid-item-card:: Import Nastran
20+
:link: pyaedt_extensions_doc/project
21+
:link-type: doc
22+
23+
Import a Nastran or STL file in any 3D modeler application.
24+
25+
.. toctree::
26+
:hidden:
27+
:maxdepth: 2
28+
29+
pyaedt_extensions_doc/project
30+
31+
HFSS extensions
32+
===============
33+
34+
35+
HFSS 3D Layout extensions
36+
=========================

doc/source/User_guide/index.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ For end-to-end examples, see `Examples <https://aedt.docs.pyansys.com/version/st
1818

1919
How to launch AEDT and create a project.
2020

21+
.. grid-item-card:: Extensions
22+
:link: extensions
23+
:link-type: doc
24+
:margin: 2 2 0 0
25+
26+
How to use PyAEDT extensions.
27+
2128
.. grid-item-card:: Modeler
2229
:link: modeler
2330
:link-type: doc
@@ -72,6 +79,7 @@ For end-to-end examples, see `Examples <https://aedt.docs.pyansys.com/version/st
7279
:maxdepth: 2
7380

7481
intro
82+
extensions
7583
modeler
7684
mesh
7785
setup
Loading
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
Import Nastran
2+
==============
3+
4+
You can import a Nastran or STL file in any 3D modeler. You can also preview the imported file and decimate it prior to import.
5+
6+
You can access the extension from the icon created on the **Automation** tab using the Extension Manager.
7+
8+
The following image shows the extension user interface:
9+
10+
.. image:: import_nastran_ui.png
11+
:width: 800
12+
:alt: Import Nastran UI
13+
14+
You can also launch the extension user interface from the terminal:
15+
16+
.. code::
17+
18+
SET PYAEDT_SCRIPT_PORT=50051
19+
SET PYAEDT_SCRIPT_VERSION=2024.1
20+
python.exe path/to/pyaedt/workflows/project/import_nastran.py
21+
22+
The available arguments are: ``file_path``, ``planar``, ``lightweight``, and ``decimate``.
23+
You can obtain these arguments from the help with this command:
24+
25+
.. code::
26+
27+
python.exe path/to/pyaedt/workflows/project/import_nastran.py --help
28+
29+
This code shows how to pass the input file as an argument, which doesn't launch the user interface:
30+
31+
.. code::
32+
33+
export PYAEDT_SCRIPT_PORT=50051
34+
export PYAEDT_SCRIPT_VERSION=2024.1
35+
python.exe path/to/pyaedt/workflows/project/import_nastran.py --file_path="my_file.stl"
36+
37+
Finally, this code shows how you can run the extension directly from a Python script:
38+
39+
.. code:: python
40+
41+
import pyaedt
42+
import os
43+
from pyaedt.workflows.project.import_nastran import main
44+
file_path = "my_file.stl"
45+
hfss = pyaedt.Hfss()
46+
# Specify the AEDT session to connect
47+
os.environ["PYAEDT_SCRIPT_PORT"] = str(hfss.desktop_class.port)
48+
os.environ["PYAEDT_SCRIPT_VERSION"] = hfss.desktop_class.aedt_version_id
49+
# Launch extension
50+
main({"file_path": file_path, "lightweight": True, "decimate": 0.0, "planar": True, "is_test": False})
51+

doc/source/create_documentation.bat

Lines changed: 0 additions & 2 deletions
This file was deleted.

doc/styles/Vocab/ANSYS/accept.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ efields
3030
EMIT
3131
FEBI
3232
FE-BI
33+
file_path
3334
getters
3435
globals
3536
[Gg]gRPC
@@ -47,6 +48,7 @@ Maxwell Circuit
4748
multiphysics
4849
multiplot
4950
namespaces
51+
Nastran
5052
netlist
5153
Nexxim
5254
numpy

0 commit comments

Comments
 (0)