Hi every one,
pls those anyone knw how to go about step by step walk tru on developing a stand alone app with arc engine using python, that will b able to run select layer by attribute queries, display map images in a window like that of arc gis, with a few Geoprocessing, editing tools?
for the select layer by attribute query, its the 'where_clause' that keeps bringing up the error. see script below:
a)
import arcpy
#i have a layer name: 'AllLGA selection' which holds a collection of local govt. areas(LGAs) out of which i intend to select lagos and display the output as stateslyr in TOC. With this next line of code it returns a copy of all LGAs under 'AllLGA selection' and paste them under the new layer 'stateslyr'.
arcpy.MakeFeatureLayer_management ("AllLGA selection", "stateslyr")
#but when i add this next line of code to pick just 'lagos', it returns error not running any of the codes.
arcpy.SelectLayerByAttribute_management ("stateslyr", "NEW_SELECTION", " [NAME] = 'lagos' ")
b)
import arcpy
#i have a layer name: AllLGA selection which holds a collection of local govt. areas out of which i intend to select 'LAGOS ISLAND' and display the output as stateslyr in TOC. With this next line of code it returns a copy of all LGAs under 'AllLGA selection' and paste them under the new layer 'stateslyr'.
arcpy.MakeFeatureLayer_management ("Current", "stateslyr")
#but when i add this next line of code to pick just 'LAGOS ISLAND', it returns error not running any of the codes.
arcpy.SelectLayerByAttribute_management("AllLGA selection","NEW_SELECTION","/\NAME/\ = 'LAGOS ISLAND'")
I'll appreciate anyone with a clear walk through on this.
thanks need this asap, cos i'm working on a project and am using python.
pls those anyone knw how to go about step by step walk tru on developing a stand alone app with arc engine using python, that will b able to run select layer by attribute queries, display map images in a window like that of arc gis, with a few Geoprocessing, editing tools?
for the select layer by attribute query, its the 'where_clause' that keeps bringing up the error. see script below:
a)
import arcpy
#i have a layer name: 'AllLGA selection' which holds a collection of local govt. areas(LGAs) out of which i intend to select lagos and display the output as stateslyr in TOC. With this next line of code it returns a copy of all LGAs under 'AllLGA selection' and paste them under the new layer 'stateslyr'.
arcpy.MakeFeatureLayer_management ("AllLGA selection", "stateslyr")
#but when i add this next line of code to pick just 'lagos', it returns error not running any of the codes.
arcpy.SelectLayerByAttribute_management ("stateslyr", "NEW_SELECTION", " [NAME] = 'lagos' ")
b)
import arcpy
#i have a layer name: AllLGA selection which holds a collection of local govt. areas out of which i intend to select 'LAGOS ISLAND' and display the output as stateslyr in TOC. With this next line of code it returns a copy of all LGAs under 'AllLGA selection' and paste them under the new layer 'stateslyr'.
arcpy.MakeFeatureLayer_management ("Current", "stateslyr")
#but when i add this next line of code to pick just 'LAGOS ISLAND', it returns error not running any of the codes.
arcpy.SelectLayerByAttribute_management("AllLGA selection","NEW_SELECTION","/\NAME/\ = 'LAGOS ISLAND'")
I'll appreciate anyone with a clear walk through on this.
thanks need this asap, cos i'm working on a project and am using python.