is there a way in Arcpy (arcgis 10.2.1) to buffer lines by selecting thier objectid?

arcpy.Buffer_analysis("MY_JUNK","d:/data/ArcGIS/Default.gdb/MY_JUNK_Buffer1","10 Meters","FULL","ROUND","NONE","#")

Currently the copout is to manually select the objects but they are changing over time and it is easier to select by objectid if possible.


It would be something like this:

Select Layer By Attribute Example (Python Window)

import arcpy
arcpy.MakeFeatureLayer_management ("C:/data/data.mdb/states", "stateslyr")

arcpy.SelectLayerByAttribute_management ("stateslyr", "NEW_SELECTION", " [OBJECTID] = 12345 OR 12346")

Then run the buffer.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.