Skip to content

Commit

Permalink
CI: fix nightly run examples (#101)
Browse files Browse the repository at this point in the history
Note: When including the new pyaedt developments related to EDB, the
examples were not update to use non_graphical mode as in previous
changes.
  • Loading branch information
SMoraisAnsys authored Dec 26, 2023
1 parent 15fa6ea commit 057e889
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
14 changes: 12 additions & 2 deletions examples/legacy/pyaedt_integration/13_edb_create_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,19 @@
generate_unique_name,
)

aedb_path = os.path.join(generate_unique_folder_name(), generate_unique_name("component_example") + ".aedb")
##########################################################
# Set non-graphical mode
# ~~~~~~~~~~~~~~~~~~~~~~
# Set non-graphical mode. The default is ``True``.

non_graphical = True

###############################################################################
# Launch EDB
# ~~~~~~~~~~
# Launch the :class:`pyedb.Edb` class, using EDB 2023 R2.

aedb_path = os.path.join(generate_unique_folder_name(), generate_unique_name("component_example") + ".aedb")
edb = pyedb.Edb(edbpath=aedb_path, edbversion="2023.2")
print("EDB is located at {}".format(aedb_path))

Expand Down Expand Up @@ -194,5 +204,5 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~
edb.save_edb()
edb.close_edb()
h3d = Hfss3dLayout(specified_version="2023.2", projectname=aedb_path, non_graphical=False)
h3d = Hfss3dLayout(specified_version="2023.2", projectname=aedb_path, non_graphical=non_graphical)
h3d.release_desktop(False, False)
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@
target_aedb = download_file("edb/ANSYS-HSD_V1.aedb", destination=project_path)
print("Project folder will be", target_aedb)

##########################################################
# Set non-graphical mode
# ~~~~~~~~~~~~~~~~~~~~~~
# Set non-graphical mode. The default is ``True``.

non_graphical = True

###############################################################################
# Launch EDB
# ~~~~~~~~~~
# Launch the :class:`pyedb.Edb` class, using EDB 2023 R2.

aedt_version = "2023.2"
edb = pyedb.Edb(edbpath=target_aedb, edbversion=aedt_version)
print("EDB is located at {}".format(target_aedb))
Expand Down Expand Up @@ -67,5 +79,5 @@
# Open project in AEDT
# ~~~~~~~~~~~~~~~~~~~~

hfss = Hfss3dLayout(projectname=target_aedb, specified_version=aedt_version)
hfss = Hfss3dLayout(projectname=target_aedb, specified_version=aedt_version, non_graphical=non_graphical)
hfss.release_desktop(False, False)

0 comments on commit 057e889

Please sign in to comment.