Here is my whole code with comments on each line
import arcgisscripting, sys
gp = arcgisscripting.create(9.3)
##a = input ("Enter Manhole Elevation: ")
##c = (a - 1.7)
##b = input ("Enter Inv Out: ")
##z = (a - b)
##print "Manhole Elevation is: " ,c
##print "Interior Drop is: " ,z
ManholeElevation = sys.argv[1]
InvertOut = sys.argv[2]
gp.workspace = #this is not complete b/c it will be a file GDB (I need the server name etc)
try:
x = (ManholeElevation - 1.7) #math function
y = (ManholeElevation - InvertOut) #math function
print "Creating lyr.. "
gp.MakeFeatureLayer_management("manhole", "lyr") #create temp lyr from manhole fetaure class with selected features
print "Selecting..."
gp.SelectLayerByAttribute_management("lyr", "New_Selection", "Elevation") #select the feature in that temporary layer???
print "Calculating..."
gp.CalculateField_management("manhole","Elevation", x) # in the manhole feature class, under the field name Elevation populate the selected feature with the sum of variable x
"Manhole elevation calculated..."
#gp.CalculateField_management("Manhole","InteriorDrop", y) # in the manhole feature class, under the Elevation field populate the sum of variable y .
except:
#If an error occurred while running a tool, then print the messages
print gp.GetMessages()
any help will be appreciated, thanks.