-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Extensions | ||
========== | ||
|
||
PyAEDT extensions provide a simplified interface to perform automated workflows. | ||
The user can install or uninstall these extensions using the extension manager. | ||
For more information, see `Extension Manager <https://aedt.docs.pyansys.com/version/stable/Getting_started/Installation.html#extension-manager>`_. | ||
|
||
Depending on the application, the user can find different extensions, the following sections describe each of them. | ||
|
||
Extensions can be launched in standalone mode from the console or from a python script. This is described on each extension section. | ||
|
||
Project extensions | ||
================== | ||
|
||
Project extension apply to all extensions that are visible to all kind of AEDT applications. | ||
|
||
.. grid:: 2 | ||
|
||
.. grid-item-card:: Import Nastran | ||
:link: pyaedt_extensions_doc/project | ||
:link-type: doc | ||
|
||
Import Nastran or STL file in any 3D modeler application. | ||
|
||
.. toctree:: | ||
:hidden: | ||
:maxdepth: 2 | ||
|
||
pyaedt_extensions_doc/project | ||
|
||
HFSS extensions | ||
=============== | ||
|
||
|
||
HFSS 3D Layout extensions | ||
Check warning on line 35 in doc/source/User_guide/extensions.rst
|
||
========================= |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
Import Nastran | ||
Check warning on line 1 in doc/source/User_guide/pyaedt_extensions_doc/project.rst
|
||
============== | ||
|
||
Import Nastran or STL file in any 3D modeler application. The user can also preview the imported file and decimate it before import it. | ||
Check failure on line 4 in doc/source/User_guide/pyaedt_extensions_doc/project.rst
|
||
|
||
User can access the extension from the icon created in the Automation tab through the extension manager. | ||
The following image is the extension user interface: | ||
|
||
.. image:: import_nastran_ui.png | ||
:width: 800 | ||
:alt: Import nastran UI | ||
Check failure on line 11 in doc/source/User_guide/pyaedt_extensions_doc/project.rst
|
||
|
||
User can launch the user interface from the terminal: | ||
|
||
.. code:: | ||
SET PYAEDT_SCRIPT_PORT=50051 | ||
SET PYAEDT_SCRIPT_VERSION=2024.1 | ||
python.exe path/to/pyaedt/workflows/project/import_nastran.py | ||
The available arguments are: file_path, planar, lightweight, and decimate. These arguments can be obtained from the help: | ||
Check failure on line 21 in doc/source/User_guide/pyaedt_extensions_doc/project.rst
|
||
|
||
.. code:: | ||
python.exe path/to/pyaedt/workflows/project/import_nastran.py --help | ||
For example, you can pass the input file as an argument, and in this case the user interface is not launched: | ||
|
||
.. code:: | ||
export PYAEDT_SCRIPT_PORT=50051 | ||
export PYAEDT_SCRIPT_VERSION=2024.1 | ||
python.exe path/to/pyaedt/workflows/project/import_nastran.py --file_path="my_file.stl" | ||
Fianlly, the extension can be used in a python script without the user interface with the following code: | ||
Check failure on line 35 in doc/source/User_guide/pyaedt_extensions_doc/project.rst
|
||
|
||
.. code:: python | ||
import pyaedt | ||
import os | ||
from pyaedt.workflows.project.import_nastran import main | ||
file_path = "my_file.stl" | ||
hfss = pyaedt.Hfss() | ||
# Specify the AEDT session to connect | ||
os.environ["PYAEDT_SCRIPT_PORT"] = str(hfss.desktop_class.port) | ||
os.environ["PYAEDT_SCRIPT_VERSION"] = hfss.desktop_class.aedt_version_id | ||
# Launch extension | ||
main({"file_path": file_path, "lightweight": True, "decimate": 0.0, "planar": True, "is_test": False}) | ||