0

I have to edit/move/create/delete a no of polygons based on their respective comparison with reality. For all the polygons that I've moved, I have to update a field called remark as "U". This is really annoying to switch everytime to the attribute window and update the same.

Is there any shortcut/add-in/extension that could enable this step in a single click(shortcut key) or automated if possible?

Liscence is Basic for ArcMap 10.3

  • 1
    You should explore Editor Tracking, it will record when and who updates a record. It is available with a Basic License, but your data must be in a File Geodatabase. Right-click the layer, properties, editor tracking, Enable editor tracking. – klewis Jun 13 at 18:00
  • 1
    Try Results window to repeat field calculation. – FelixIP Jun 13 at 19:52
  • Is your data in a database? A real database not file geodatabase? Real databases support trigger functions which may be of use. In ArcObjects there is an event IEditEvents.OnChangeFeature which will pass the feature as it is being changed, I have used this to automatically tag a feature with A for attribute change, S for geometry modified, B for both and N for new but beware the update fires another event so if you're not careful you can go into an infinite loop. If ArcObjects isn't your thing then Emil's answer is the way to go, open the python window and copy/paste the code each time. – Michael Stimson Jun 14 at 2:35
  • Work on a copy. Compare when done and populate field in question at once. – FelixIP Jun 14 at 5:21
4

You can use selection and Python. This may be faster. Make sure your edited feature is selected. Then use the below code in the Python window.

if arcpy.Describe ("layer").FIDSet:
    with arcpy.da.UpdateCursor ("layer", "update_field") as curs:
        for row in curs:
            row = ("U",)
            curs.updateRow (row)
else:
    print "no selection"

"layer" is the name of the layer you're updating. "update_field" is the field you're updating with a U. This process can be easily repeated because once the code is run you can move your cursor to the code and press Enter to run the code as many times as desired.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.