charanp

Near_Analysis tool help

Discussion created by charanp on Jun 29, 2011
Latest reply on Jun 29, 2011 by Dan_Patterson
Hi ,
I am writing a python script that does the Near_Analysis. The script is as follows

This works
workspaceName = "C:\...\ShapeFiles"
nearFeatures="shapefile1.shp"
arcpy.Near_analysis (inputData, nearFeatures)


According to help http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Near/00080000001q000000/ it says I can specify more than 1 feature class as near features. So I modify my code as

This doesn't work (the directory C:\...\ShapeFiles has multiple shape files)
workspaceName = "C:\...\ShapeFiles"
nearFeatures="shapefile1.shp,shapefile2.shp"
arcpy.Near_analysis (inputData, nearFeatures)


I tried nearFeatures="[shapefile1.shp,shapefile2.shp]" , nearFeatures="shapefile1.shp,shapefile2.shp" and many other combinations but it doesnot work

Can anyone help me?

Outcomes