Arcpy Intersect analysis function returns an error when using certain types of string

المشرف العام

Administrator
طاقم الإدارة
In an arcpy for the intersect_analysis function, certain syntax works and others don't. What is the reason for this?

Works:

arcpy.Intersect_analysis("'D:\\Program Files (x86)\\ArcGIS\\data\\uscities.shp' #;'D:\\Program Files (x86)\\ArcGIS\\data\\riverbuffers2.shp' #", Cities_Near_Rivers, "ALL", "", "INPUT") arcpy.Intersect_analysis("'D:\\Program Files (x86)\\ArcGIS\\data\\uscities.shp' #;C:\\Users\\t.thomas\\Documents\\ArcGIS\\Default.gdb\\usrivers_Buffer #", Cities_Near_Rivers, "ALL", "", "INPUT") Does not work:

arcpy.Intersect_analysis("'D:\\Program Files (x86)\\ArcGIS\\data\\uscities.shp' #;D:\Program Files (x86)\ArcGIS\data\riverbuffers2.shp #", Cities_Near_Rivers, "ALL", "", "INPUT") It seems that whenever a 'Program Files (x86)' is there in the path, the tool requires a single quote around the input. What is the reason for this?



أكثر...
 
أعلى