1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| import arcpy, datetime
# Input parameters of the table editable fields
Nom_Unite= arcpy.GetParameterAsText(0)
Date_Heure= arcpy.GetParameterAsText(1)
Latitude= arcpy.GetParameterAsText(2)
Longitude= arcpy.GetParameterAsText(3)
Activite= arcpy.GetParameterAsText(4)
Remarques=arcpy.GetParameterAsText(5)
# Input table, Featureclass
IntputFC= arcpy.GetParameter(6)
# Create insert cursor for table
rows = arcpy.InsertCursor(IntputFC)
row = rows.newRow()
# Insert the parameters values into the corresponding fields
row.setValue("Nom", Nom_Unite)
row.setValue("Activite", Activite)
row.setValue("Latitude", Latitude)
row.setValue("Longitude", Longitude)
row.setValue("Date", Date_Heure)
row.setValue("Remarque", Remarques)
rows.insertRow(row)
# Delete cursor and row objects to remove locks on the data
del row
del rows |
Partager