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
<SPAN class="keyword token">import</SPAN> arcpy
<SPAN class="comment token"># Load required toolboxes</SPAN>
arcpy<SPAN class="punctuation token">.</SPAN>ImportToolbox<SPAN class="punctuation token">(</SPAN><SPAN class="string token">"MyToolbox.tbx"</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">"MyToolbox"</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="comment token"># Execute FME Workspace</SPAN>
arcpy<SPAN class="punctuation token">.</SPAN>MyToolbox<SPAN class="punctuation token">.</SPAN>MyFmeWorkspace<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="comment token"># Get all messaged produced by the FME Workspace after execution is finished.</SPAN>
arcpy<SPAN class="punctuation token">.</SPAN>AddMessage<SPAN class="punctuation token">(</SPAN>arcpy<SPAN class="punctuation token">.</SPAN>GetMessages<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Even Geoprocessing tools suffer from the same issue when called within a script.
Is it possible to reroute output as the script runs?
Also, asked on Geographic Information Systems Stack Exchange for a broader audience.
How do I get ArcGIS to show script output as it is executing an FME Workspace or Geoprocessing Tool?