AnsweredAssumed Answered

GeodatabaseUI.ICalculatorUI2 no longer works in ArcMap 10.1

Question asked by robby.maddox on Jun 23, 2014
Latest reply on Jul 9, 2014 by robby.maddox
I have an addin that has been ported from ArcMap 9.3 to 10.1 and this code worked perfectly in 9.3 but for some reason won't work at all in 10.1:

ICalculatorUI calc = new CalculatorUI();
calc.Table = MyTable;
calc.Field = "MyField";

The actual code is a little more complicated than that, but I've tried it with this simplified version and it still doesn't work.

What happens is the calculator dialog pops up just fine and I can enter a value to set the field to, but when I hit the OK button, the dialog closes without error, but nothing has been updated.

I've opened the table that I'm editing using ArcMap's regular ui and launched the Field Calculator on the same field and can confirm that it looks exactly like what I see when I use this bit of code on my own form. There are only three differences:

  • Prior to the dialog displaying, there's a warning dialog that pops up telling me that I'm not in an editing session and the changes can't be undone.

  • After the OK button is pressed, a progress dialog shows briefly while the rows are being updated.

  • The rows are actually updated.

So everything that is displayed on the dialog itself is identical, including the name of the field and the list of other fields in the table.

In ArcMap 9.3, the `ICalculatorUI` would take over everything as soon as `DoModal` was called. It annoyingly didn't even provide feedback programmatically to signify if the user canceled the dialog or [if/how many] rows were updated. Very black box and it sucked, but at least it worked!

I've not been able to find any help on this anywhere, especially not on ESRI's pathetic documentation, which appears to be copied and pasted from their 9.x documentation. I've also posted this question on StackOverflow, but haven't gotten any responses there either and it's been almost two weeks...

I have people waiting on this, so any help would be greatly appreciated. Thanks.