AnsweredAssumed Answered

Moving a Point Feature to a New X, Y Coordinate Using Field Calculator

Question asked by JWest82 on Aug 7, 2014

Good morning,


I have been having some issues with a field calculation to redefine my X, Y values from a table import. I have a script saved but it is not working for me anymore and I keep getting the ERROR 000539: SyntaxError: invalid syntax (<expression>, line 1).

I am running Arc 10.1

I have fields named X and Y.

I begin editing select my Shape* field and select Field Calculator.

Create my Python script in the codeblock.


def movePoint(shape,X,Y):
point = shape.getPart(0)
point.X = X
point.Y = Y
return point


SHAPE = movePoint( !SHAPE!, !X!, !Y! )


Normally this was working for me but I have only been getting errors trying to run it on this dataset.


Thanks in advance.