AnsweredAssumed Answered

Arcpy Update Geometry Field with Update Cursor

Question asked by DEVAPPGIS on Feb 22, 2017
Latest reply on Feb 22, 2017 by Dan_Patterson


i have a feature layer with some records that have Shape filed with value None.

I would like update the Shape field with a correct value and i woul take it by other feature class.

I have seen some code posted here on geonet and this is my script

sourceFC = 'fc_lyr'
sourceField = ['ID_VALUE','SHAPE']
valueDict = {r[0]:(r[1:]) for r in arcpy.da.SearchCursor(sourceFC, sourceField)}

updateFieldsList = ["ID_VALUE", "Shape"]
with arcpy.da.UpdateCursor(updateFC, updateFieldsList) as updateRows:
    for updateRow in updateRows:
        keyValue = updateRow[0]
        if keyValue in valueDict:
            updateRow[1] = valueDict[keyValue][0]


whit this script the field Shape is not update, but if i change the field Shape with some other field and try to update it, the update works.

Why the Sahpe field is not update???