I have a script mostly using arcpy, and in the middle of this script I convert a load of polylines to polygons:

arcpy.ET_GPPolylineToPolygon("Contours_L_1m.shp", "Contours_G_1m.shp", "FALSE")

This worked when it was a very small data set, but with lots of data it takes ages then crashes because it runs out of ram.

Fortunately I found that using the AreaBuilder transformer in FME will do the same thing really quickly and without crashing. The problem here is that I now have to run the first half of my script, stop, convert my contours in FME, then run the second half of my script. So what I would like would be (ideally) to be able to run the AreaBuilder transformer from the ArcGIS python window, or (failing that) run the workbench from the python window, wait for it to finish, then continue the script.

Is this at all possible? and how would I go about achieving it?

  • 4
    Any fme workbench can be run from a command line. You could look into running a commandline argument from the python script. Alternatively, you can run your python script within FME using python caller, or python startup script, etc.
    – Fezter
    Oct 8, 2015 at 22:20
  • 4
    subprocess.Popen() can be used to execute command line statements from within a Python script.
    – Bjorn
    Aug 24, 2016 at 17:40

1 Answer 1


FME has the option of calling startup and shutdown Python scripts. It sounds like you could move the two halves of your Python inside an FME workbench along with the workbench.

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.