How to modify a feature within row events while using some geoprocessing tool?

217
4
a month ago
kirken
by
New Contributor III

Hi! I don't quite understand how to change attribute values when some geoprocessing tool (e.g. "Calculate Field" is modifying rows. I want to change some attribute values within the same row event. I know how to do this in edit session (I followed this example and it works when I' m using Edit tab tools). But with Calculate Field using this parent Edit operation does not seem to work and I don't know why, although I get the operation from the RowChangedEvent.

0 Kudos
4 Replies
GintautasKmieliauskas
Regular Contributor

Hi,

Calculate Field tool doesn't allow to do "Undo" operation. It seems that it writes changes without edit operation.

0 Kudos
kirken
by
New Contributor III

Actually it is possible to enable undo for the calculate field as well and I can listen for the row changed event but I haven't managed to change attributes within the same operation.

0 Kudos
GintautasKmieliauskas
Regular Contributor

Before writing I have done field calculation on Enterprise database and it not allows "Undo".

If you can handle RowChangedEvent, then you can modify attributes like in that thread:

https://community.esri.com/t5/arcgis-pro-sdk-questions/split-polygon-and-modify-its-attributes/m-p/7... 

0 Kudos
kirken
by
New Contributor III

Actually I did some more testing and found that I can only listen for the row changed event of geoprocessing tools if I 'm in edit session, otherwise not.