Hi,
I am looking for some help writing a Python script to move my annotated layers outside of the buffer zone and to make them not overlap.
Any help is appreciated on this.
Thank you!
I think you're going to need to give us a little more information to properly help you.
Do you have anything so far?
That being said, this was awful and I did not have a good time. This will probably help a little bit but you'll have to tweak for your usecase. I'd take a look at the Geometry methods for more ideas. It looks like the annotations come in natively as lines, so pay close attention to the polyline page.
import arcpy fc = r"path to anno" dX = -2000 dY = 2000 with arcpy.da.UpdateCursor(fc, ["ANNO@"]) as cursor: for row in cursor: graph = row[0].getGraphic('V3') newshp = newshp.move(dX,dY) graph.shape = newshp row[0].setGraphic(graph) cursor.updateRow(row)
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.