3

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?

  • 1
    I don't believe you can - 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. – Midavalo Sep 1 '16 at 18:09
  • 1
    A workaround I can think is reading the log file in a separate thread or process and output that alongside of the processing, requires some additional code and configuration. – chrki Sep 1 '16 at 19:36
1

In FME 2016 I think there's a new transformer called Feature Writer, which allows you to write midway through the run and an option to write out results at a suitable place during processing.

  • 1
    Welcome to SE. Could you add a screen shot of the process or a link to the tool. Just to make you answer a little more solid. You don't come across as very sure. Some sort of reference will go a long way to making this a good answer for others to use. – Knightshound Sep 2 '16 at 9:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.