You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone!
I want to write the database command log to a file, so I looked at the documentation for ”Mapdl.lgwrite":
When I use this function, I generate GRPC-related content (e.g. /OUT,anstmp) in the log file, but I want to delete it.
Does anyone know what to do? Please help me!
Here's my code:
import os
from ansys.mapdl.core import launch_mapdl
path = os.getcwd()
mapdl = launch_mapdl(jobname="check_log", run_location=path, override=True)
mapdl.finish()
mapdl.clear()
mapdl.prep7()
mapdl.k(1, 0, 0, 0, mute=True)
mapdl.k(2, 2, 0, 0)
mapdl.lgwrite("check_log.txt", kedit="remove", remove_grpc_extra=True)
mapdl.exit()
with open("check_log.txt", "r") as fid:
lines = fid.readlines()
print("".join(lines))
And then this is the output, and I see the resulting log file does not remove grpc related content(like /OUT,anstmp).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everyone!
I want to write the database command log to a file, so I looked at the documentation for ”Mapdl.lgwrite":
When I use this function, I generate GRPC-related content (e.g. /OUT,anstmp) in the log file, but I want to delete it.
Does anyone know what to do? Please help me!
Here's my code:
And then this is the output, and I see the resulting log file does not remove grpc related content(like /OUT,anstmp).
Beta Was this translation helpful? Give feedback.
All reactions