I have ArcGIS 10.2 for Desktop and I have created code which does the following. Abstracts from 1st row 1st column 10, (1500-10) adds it at the second and then repeats A-=A where A= 1500. I want to write a tool with that script that will ask from user to put the fclass and then do the procession but I have no idea how to do that altough I have read several things about creating tools. Propably I must use get parameter as Text but I really don't know how.
Q A 1500 1500 1340 1490 1234 1480 1543 1470 import arcpy f = "c:/Wi/Arm/Fo.shp" field = ["Bo", "Cond"] i = 10 with arcpy.da.UpdateCursor(f, field, "FID = 0") as cursor: for row in cursor: row = row - 10 cursor.updateRow(row) Bo = row Cond = Bo cursor.updateRow([Bo, Cond]) with arcpy.da.UpdateCursor(f, ['Cond'], "FID >= 1") as cursor: for row in cursor: Cond = (Cond - i) cursor.updateRow([Cond])