AnsweredAssumed Answered

calling custom tool in python

Question asked by michaelflet on Dec 22, 2016
Latest reply on Dec 22, 2016 by bem08c

I am using the 'ConcaveHull' custom toolbox, and it works when I run it on an individual shape file but I am trying to run it in a loop, that references a list. I have run the loop with other tools and the loop works, and I have ensured that the name and label of the toolbox are identical in order to remove that confusion. I am receiving an error:

Failed to execute. Parameters are not valid.

ERROR 000732: Input Points: Dataset "Bowie.shp" does not exist or is not supported

Failed to execute (ConcaveHull).

 

I have tried running the loop without the '.shp' extension but that makes no difference.

 

Here is my code:

outpathbase = "Y:/Desktop/ARCGIS/Muller_etal_2016_AREPS/Muller_etal_AREPS_Supplement/MFCat2/Collide_Notpython/ConcaveHull/"

arcpy.ImportToolbox("Y:\Desktop\ARCGIS\Toolboxes\ConcaveHullByCase\ConcaveHullByCase.tbx")

list = ['Amsterdam', 'Bowie'];

for var in list:

print var

plume = '"' + var + '.shp' + '"'

print plume

outpath = '"' + outpathbase + var + 'Concave2' +'"'

arcpy.ConcaveHull(plume,"10",outpath,"#","#")

print outpath

print "complete"

 

Also, here is the link to the Toolbox written by Richard Fairhurst:

ConcaveHullByCase.zip

 

Thanks!

Michael

Outcomes