Select to view content in your preferred language

Run a python script in a ModelBuilder

446
0
09-27-2011 11:52 AM
FranzLeonardo
Frequent Contributor
I have a script in python Fill a raster tool, the code is this:

import arcpy,os,glob,sys
arcpy.CheckOutExtension("spatial")

arcpy.env.overwriteOutput=True

path=sys.argv[1]
raster=sys.argv[2]

DEM = raster

# Process: Fill
arcpy.gp.Fill_sa(DEM, path+"\\DEM_Fill", "")

Using two parameters: script of the toolbox in ArcMap, and the other in ModelBuilder add the script with parameters of the path (workspace) and raster (Raster Dataset), run and displays the error:

<class 'arcgisscripting.ExecuteError'>: Failed to execute. Parameters are not valid.
ERROR 000860: Input surface raster: is not the type of Composite Geodataset, or does not exist.
Failed to execute (Fill).

Thank you for your help.

I have ArcGIS 10.
Tags (2)
0 Kudos
0 Replies