Select to view content in your preferred language

FieldCalculator not triggering custom editor tracking Add-In

629
5
07-18-2023 10:27 AM
BrianBulla
Honored Contributor

Hi,

So I've created an Add-In for tracking any and all edits made and ensuring fields like LASTUSER, MXCREATIONSTATE, etc. are filled in properly to accomodate our asset management system.  All is working, until today when I did some edits using the "Field Calculator" on a table.  The edits made by the calculator saved, but none of the fields my Add-In updates got updated.

Are there any known issues with how the Field Calculator works??

I also created this same Add-In for ArcMap, and in ArcMap everything updates properly even when using the Field Calculator.  It's just in Pro that we are seeing this issue.  We are at ArcGIS Pro 2.9.

Thanks,

0 Kudos
5 Replies
RichardDaniels
Frequent Contributor
The Field Calculator is does its work outside an edit session, so if your are dependent on an 'edit session' existing then those changes would not be caught.
0 Kudos
BrianBulla
Honored Contributor

But in Pro there is no such thing as an "edit session" like in ArcMap.  You are always in an edit session.

And in ArcMap, the field calculator only works while in an edit session.

In Pro is there someway to modify how the Field Calculator works, so that the edits done in it are 'caught'??

0 Kudos
BrianBulla
Honored Contributor

Hi @NarelleChedzey  Hopefully all is well.  Could you maybe have a look at this post and let me know if you have any insight?  It seems like our Editor Extension will not fire when we use the Field Calculator to make edits.  Is there a way to get it to work?

0 Kudos
Wolf
by Esri Regular Contributor
Esri Regular Contributor

As I understand, the 'Field Calculator' run as a GP Tool.  So you can try this setting:

Wolf_0-1692825481395.png

Or programmatically: SetEnableUndoOn Method—ArcGIS Pro

Either way seemed to work for me:

Wolf_1-1692825627041.png

 

0 Kudos
BrianBulla
Honored Contributor

Hi @Wolf .  Unfortunately, that made no difference for me.  With or without that "Enable Undo" checkbox checked, the Editor Extension will not fire when I use the Field Calculator tool.

Any ideas as to what might be going on?

Under standard editing, all of my custom editing tools and other tools (like Attrribute Transfer, Split, etc.) my custom Editor Extension will work.....just not when the Field Calculator runs.

0 Kudos