Help with script

Discussion created by rsoper on Jun 21, 2011
Latest reply on Jun 22, 2011 by rsoper
Hi, I'm new to python. I created a model with model builder and it works fine. When I exported it a s a python script it does not perform it's function. This is the Code:
# ---------------------------------------------------------------------------
# Created on: Tue Jun 21 2011 03:36:21 PM
#   (generated by ArcGIS/ModelBuilder)
# ---------------------------------------------------------------------------

# Import system modules
import sys, string, os, arcgisscripting

# Create the Geoprocessor object
gp = arcgisscripting.create()

# Load required toolboxes...
gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")

# Local variables...
parcel_shp = "C:\\PVAShp\\parcel.shp"
parcel_shp__2_ = "C:\\PVAShp\\parcel.shp"

# Process: Calculate Field...
gp.CalculateField_management(parcel_shp__2_, "per_sqft", "newval", "VB", "if ([LV_sqft] > 0) then\\n    newval = [bldgvalue] / [LV_sqft]\\nelse\\n   newval = 0\\nend if")

can anyone tell me what is wrong?