import arcpy, os, gc from arcpy import env #The ingut personal geodatabase env.workspace =r"C:\Users\david\Documents\ValidateChristina\Christina.mdb" #An output folder outLocation= r"C:\Users\david\Documents\ValidateChristina\OutLocation" arcpy.env.overwriteOutput=True #Loop through the feature datasets in the pgdb for dataset in arcpy.ListDatasets(): #List the point files found in the current dataset ptList = arcpy.ListFeatureClasses("*","POINT",dataset) #list the rasters found in the pgdb rasterList= arcpy.ListRasters() print rasterList #loop through each poinf feature class in the list for pointFC in ptList: #Extract raster values that correspond with the listed point file for raster in rasterList: #perform the extract ExtractValuesToPoints(pointFC,raster,outLocation+os.sep+"IntermValue.shp") print "Done"
Solved! Go to Solution.
When my code tries to execute the tool, I am returned the error
"NameError: name ExtractValuesToPoints is not defined"
from arcpy.sa import * ... ExtractValuesToPoints(...)
arcpy.sa.ExtractValuesToPoints(...)
When my code tries to execute the tool, I am returned the error
"NameError: name ExtractValuesToPoints is not defined"
from arcpy.sa import * ... ExtractValuesToPoints(...)
arcpy.sa.ExtractValuesToPoints(...)
Perfect answer.