how can i export a shapefile [on hold]

المشرف العام

Administrator
طاقم الإدارة
I want to select the cities that exist in Morocco and export it to a shapefile and I used this code but its not working, it gives me an error:

code:

import arcpyfrom arcpy import envarcpy.env.workspace= r"E:\cities" Mo= r"E:\cities\cities.shp" rows = arcpy.SearchCursor(Mo,'"CITY_NAME"=\'Rabat\'')row = rows.next()row.getValue("CNTRY_NAME")where='"CNTRY_NAME" ="Morocco"'arcpy.SelectLayerByAttribute_management("cities","New_SELECTION",where)arcpy.RefreshActiveView()error:Traceback (most recent call last): File "E:\cities\scripts\selection_villes.py", line 9, in arcpy.SelectLayerByAttribute_management("cities","New_SELECTION",where) File "c:\program files\arcgis\desktop10.1\arcpy\arcpy\management.py", line 6461, in SelectLayerByAttribute raise eExecuteError: ERROR 000358: Expression non valide

أكثر...
 
أعلى