Why do I get 0 with calculate field in my script?

المشرف العام

Administrator
طاقم الإدارة
My Script:


#Define parameters input = sys.argv[1] major_axis = sys.argv[2] minor_axis = sys.argv[3] azimuth = sys.argv[4] #Add XY to point data arcpy.AddXY_management(input) #Add major axis, minor axis arcpy.AddField_management(input, field_name="MAJOR_AXIS", field_type="LONG", field_precision="", field_scale="", field_length="", field_alias="", field_is_nullable="NULLABLE", field_is_required="NON_REQUIRED", field_domain="") arcpy.AddField_management(input, field_name="MINOR_AXIS", field_type="LONG", field_precision="", field_scale="", field_length="", field_alias="", field_is_nullable="NULLABLE", field_is_required="NON_REQUIRED", field_domain="") #Add azimuth arcpy.AddField_management(input, field_name="AZIMUTH", field_type="LONG", field_precision="", field_scale="", field_length="", field_alias="", field_is_nullable="NULLABLE", field_is_required="NON_REQUIRED", field_domain="") #Calculate minor axis field arcpy.CalculateField_management(input, "MAJOR_AXIS", major_axis, "VB", "") #Calculate minor axis field arcpy.CalculateField_management(input, "MINOR_AXIS", minor_axis, "VB", "") #Calculate azimuth field arcpy.CalculateField_management(input, "AZIMUTH", azimuth, "VB", "") Parameters setting in Script:




Script runs correctly without errors, but in Attribute Table I get 0 in AZIMUTH, MINOR_AXIS, MAJOR_AXIS fields. Why? When I use Calculate Field from toolbox, it works.



أكثر...
 
أعلى