You need to use some geoprocessing tools. Try the "SelectByAttribute" tool to select your polygon from the attribute table. You need to convert the attribute table to a feature layer to in order to make it selectable. Here's a peice from a script of mine that might help. It helps you select points in polygons, but the general idea of what you are looking to do is there:# Converts unselectable feature class into a selectable feature layer
gp.MakeFeatureLayer(POINT,"point")
gp.MakeFeatureLayer(POLYGON,"polygon")
rows = gp.SearchCursor("polygon")
row = rows.Next()
gp.AddMessage("Calculating Points in Polgons...")
try:
while row:
#gp.AddMessage(row.OBJECTID)
# Select each record inside of the polygon feature class
SelPoly = gp.SelectLayerByAttribute("polygon", "NEW_SELECTION", "\"OBJECTID\" =" + str(row.OBJECTID))
#gp.AddMessage(row.OBJECTID)
# Select all the point that are inside of the polygon record
SelPts = gp.SelectLayerByLocation("point", "WITHIN", SelPoly, 0, "NEW_SELECTION")
# Count the points that are in each polygon
GetCount = gp.GetCount_management(SelPts)
# Calculate the ASSOC_PTS field with the counted points
gp.CalculateField_management("polygon", "ASSOC_PTS", GetCount, "VB", "")
# Move to the next row
row = rows.Next()