Update a single attribute field of manually selected features (not sel by location)

Discussion created by boothtp on Jun 7, 2011
Latest reply on Jun 8, 2011 by boothtp
     I am trying to write a python script that will populate an attribute field of a selected feature.  I see that it is possible with select features by location by..

Use makefeaturelayer.
Feed the feature layer into the selectbylocation.
then use calculate field.

However I am selecting one point feature at a time and I am only trying to update one field with my script..

I thought the right tool was the script below but it updates every feature in that field instead of the selected feature. (Manhole is the feature class, Elevation is the field name, x is the sum of a mathematical function from another part of the code.)

gp.CalculateField_management("Manhole","Elevation", "x")

Any help will be appreciated.