How to get the app.print_tree() into logger.....? #1059
Unanswered
B-Naveen-Kumar
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi team, Im trying to get the app.print_tree() tree data into the logger. Below is the script for you reference:
`import os
os.environ['PYTHONIOENCODING'] = 'utf8'
from ansys.mechanical.core import App
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
stream_handler = logging.StreamHandler(sys.stdout)
stream_handler.setLevel(logging.DEBUG)
logger.addHandler(stream_handler)
ansys_app = App(version=242)
ansys_app =App(version=242)
ansys_tree = ansys_app.print_tree()
logger.debug(f"Ansys Tree Structure:\n{ansys_tree }")
`
But im unable to get the tree.
I need you assistance here..!!
Beta Was this translation helpful? Give feedback.
All reactions