Hi,
I have a script that creates a new field and then chooses the field of diameter and runs an equation to convert it from millimeters to meters and then makes a Buffer
But there is a problem with the script that I don't know about
Note: This is my first try
My script
Import arcpy
# Script arguments
Input_Feature == arcpy.GetParameterAsText(0)
Field == arcpy.GetParameterAsText(1)
Output_Feature == arcpy.GetParameterAsText(2)
New_Field == "Buf"
Expression == "{ }".format ((!Field!/1000)/2)
# Local variables:
Feature_2 = Input_Feature
Feature_3 = Feature_2
# Process: Add Field
arcpy.AddField_management(Input_Feature, "Buf", "FLOAT", "", "", "", "", "NULLABLE", "NON_REQUIRED", "")
# Process: Calculate Field
arcpy.CalculateField_management(Feature_2, "Buf", "Expression ", "PYTHON", "")
# Process: Buffer
arcpy.Buffer_analysis(Feature_3, Output_Feature, "Buf", Side_Type, End_Type, "NONE", "", Method)