I have a script that uses gp tools that takes a long time.
The tool I am using is Build Overviews that can take long time but have many messages that showing the progress.
When I run this tool within python script, I do not see these messages.
I can only AddMessage before and after the tool.
Is there any way to send the message to the display even if it runs inside a script.
Thanks
With straight python, I think your only option is to turn on "Open messages window automatically after running a tool"
Go to Project > Options > Geoprocessing and check "Open messages window automatically after running a tool".
Add something like this at the end of you script.
arcpy.AddMessage("Starting long tool...")
try:
arcpy.AddMessage("=== Tool Messages ===")
arcpy.AddMessage(arcpy.GetMessages()) # All messages (info + warnings + errors)
except arcpy.ExecuteError:
arcpy.AddError(arcpy.GetMessages(2)) # Only errors