Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
dipinknair committed Aug 15, 2024
1 parent 8cee787 commit 978b889
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 95 deletions.
25 changes: 0 additions & 25 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,28 +146,3 @@
# Read link all targets from file
with open("links.rst") as f:
rst_epilog += f.read()


def _add_mech_libraries_for_examples():
import os
import sys

awp_root = None
for key, value in os.environ.items():
if key.startswith("AWP_ROOT"):
awp_root = value
print(awp_root)
break

if awp_root:
location = os.path.join(awp_root, "Addins", "ACT", "libraries", "Mechanical")
if os.path.isdir(location):
sys.path.append(location)
print(f"Added to sys.path: {location}")
else:
print(f"Directory does not exist: {location}")
else:
print("No AWP_ROOT environment variable found.")


_add_mech_libraries_for_examples()
2 changes: 1 addition & 1 deletion examples/00_tips/tips_01.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

# %%
# .. note::
# This visualization is currently available only for geometry.
# This visualization is currently available only for geometry and on version 24R2 or later

# %%
# Cleanup
Expand Down
2 changes: 2 additions & 0 deletions examples/00_tips/tips_02.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ def display_image(image_name):
Graphics.ExportImage(
os.path.join(cwd, "geometry.png"), image_export_format, settings_720p
)

# Display image using matplotlib
display_image("geometry.png")

# %%
Expand Down
6 changes: 3 additions & 3 deletions examples/00_tips/tips_03.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
""" .. _ref_tips_03:
Display project tree
Project tree
--------------------
Displays the heirarchial Mechanical project structure.
Display the heirarchial Mechanical project structure.
"""

# %%
Expand Down Expand Up @@ -40,7 +40,7 @@
app.print_tree()

# %%
# Display only tree under first analysis
# Display tree only under first analysis
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

app.print_tree(Model.Analyses[0])
Expand Down
66 changes: 0 additions & 66 deletions examples/00_tips/tips_04.py

This file was deleted.

0 comments on commit 978b889

Please sign in to comment.