AnsweredAssumed Answered

Can you query a variable in Select_analyis?

Question asked by wle0001 on Jun 6, 2012
Latest reply on Jun 7, 2012 by wle0001

I an having troubles querying a variable using the arcpy.Select_analysis() tool.

For example:

import arcpy from arcpy import env   env.workspace = "D:\\Lee\\IrrigationProject"  In = "boombuffer.shp" Out = "D:\\Lee\\IrrigationProject\\IrrigationModel\\BoomBuffers\\Boom" Boom = 1  arcpy.Select_analysis(In, Out + str(Boom) + ".shp" , '"BoomNumber" = 'Boom'')

This is not valid syntax, however I can't seem to figure it out. I would like to include this in a loop that would create a new shapefile from each feature in the input shapefile.

Any help would be greatly appreciated.