Quantcast
Channel: Question and Answer » arcpy
Viewing all articles
Browse latest Browse all 767

How to update annotations from fields values to annotations objects

$
0
0

I have annotations feature class and need to update some field offset and alignment values

When I edits them manually at attributes table in ArcMap, new values applies to objects and they changes thrir positions at map.

And when I updates them via script:

with arcpy.da.UpdateCursor(annotations_fc, ['VerticalAlignment', 'YOffset']) as cursor:
    for row in cursor:
        row[0] = 3
        row[1] = 2.0
        cursor.updateRow(row)

del cursor

attributes table has new values but these values doesn’t apply to map objects

Arcpy has UpdateAnnotation_management method for annotations updating. But as I understand, it updates field values from annotation objects when I needs reverse action – update annotation objects from fields values.

Is such method exist? If not in arcpy, at least in arcobjects.net?

Or am I doing something wrong?


Viewing all articles
Browse latest Browse all 767

Trending Articles