Hi there,
So I have one feature class in a personal geodatabase. I wrote a python script using "selectLayerByAttribute_management", the script was running successfully however the selected records are not highlighted in arcmap. I ran the script in both standalone version and by adding it as a script in ArcToolbox. thanks in advance! Here is my code:
import arcpy
arcpy.env.workspace = "C:/Users/dcheng/Documents/IDOP test/tables/IDOP_test.mdb"
hole_shp = "holes_leg1_leg96_fortest"
hole_shp_lyr = "holes_leg1_leg96_lyr"
arcpy.MakeFeatureLayer_management(hole_shp, hole_shp_lyr)
arcpy.SelectLayerByAttribute_management(hole_shp_lyr, "NEW_SELECTION", '[PK] = "1_5A"')
print "done"
Thanksss!
Dan
So I have one feature class in a personal geodatabase. I wrote a python script using "selectLayerByAttribute_management", the script was running successfully however the selected records are not highlighted in arcmap. I ran the script in both standalone version and by adding it as a script in ArcToolbox. thanks in advance! Here is my code:
Quote:
import arcpy
arcpy.env.workspace = "C:/Users/dcheng/Documents/IDOP test/tables/IDOP_test.mdb"
hole_shp = "holes_leg1_leg96_fortest"
hole_shp_lyr = "holes_leg1_leg96_lyr"
arcpy.MakeFeatureLayer_management(hole_shp, hole_shp_lyr)
arcpy.SelectLayerByAttribute_management(hole_shp_lyr, "NEW_SELECTION", '[PK] = "1_5A"')
print "done"
Dan