withershin

Field Calculator - Python replacement for simple VB Script - Move XY

Discussion created by withershin on Oct 31, 2011
Latest reply on Oct 31, 2011 by withershin
Hello everyone,

We've been using the super simple syntax:
[Shape] = Shape
[Shape].X = [NEAR_X] 
[Shape].Y = [NEAR_Y]

To move the location of points in field calculator to new positions based on NEAR results. ThisVB Script doesn't work in Arc10 and now I have to learn python to replace 2 lines of code and I barely do any coding now.

It gives me the error Object Required 'esri__1' in both ArcCatalog and ArcMap. I read somewhere it has to do with the new VB Script parser. This model step is in the middle of a 50+ process model so any solution needs to work in line.

I've searched and searched for a simple python version with no success. My workaround is to just make a new feature with 'XY Event' but I'd really rather just update the 'broken by version 10' code.

Any help would be appreciated.

Outcomes