Hi team, Im trying to get the app.print_tree() tree data into the logger. Below is the script for you reference:
`import os
import logging
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)
from ansys.mechanical.core import App
app = App()
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 your assistance here..!!