Hello,
Try using arcpy, see the code below.
def rotation(rotatefield):
def rotatepoint(point, pivotpoint, angle):
angle_rad = -math.radians(angle)
ox, oy = pivotpoint.X, pivotpoint.Y
px, py = point.X, point.Y
qx = ox + math.cos(angle_rad) * (px - ox) - math.sin(angle_rad) * (py - oy)
qy = oy + math.sin(angle_rad) * (px - ox) + math.cos(angle_rad) * (py - oy)
return arcpy.Point(qx,qy)
with arcpy.da.UpdateCursor("annotation_polygons",['SHAPE@', rotatefield]) as cursor:
for row in cursor:
polylist = []
for part in row[0]:
partlist = []
for pnt in part:
if pnt is not None:
partlist.append(rotatepoint(pnt, arcpy.Point(row[0][0][0].X, row[0][0][0].Y), row[1]))
polylist.append(partlist)
row[0] = arcpy.Polygon(arcpy.Array(polylist))
cursor.updateRow(row)