I have a long running (1-2hrs) FME Workspace that I'm calling through a script. How do get the intermediate results to show in ArcGIS while it's executing?
For example, if I call the FME Workspace directly from the Python console or from the GUI, then the results will show as it is executing in the console or the results window, respectfully. However, it won't show any results when called from the script. The best I can do is show all results at the end using the following.
MyWrapperScript.py
import arcpy
# Load required toolboxes
arcpy.ImportToolbox("MyToolbox.tbx","MyToolbox")
# Execute FME Workspace
arcpy.MyToolbox.MyFmeWorkspace()
# Get all messaged produced by the FME Workspace after execution is finished.
arcpy.AddMessage(arcpy.GetMessages())
Even Geoprocessing tools suffer from the same issue when called within a script.
Is it possible to simply reroute output directly to "AddMessage" as the script runs?
AddMessage
returns your messages after your tool has run, so it won't do it during. You might be able to get a console window to open and display messages there (through a batch file perhaps), but I don't think you could do it through addmessage.