5

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?

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Oct 8, 2015 at 13:04
2
  • 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. Commented Oct 8, 2015 at 22:20
  • 4
    subprocess.Popen() can be used to execute command line statements from within a Python script. Commented Aug 24, 2016 at 17:40

1 Answer 1

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.

answered Jun 16, 2016 at 21:12

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.