Select to view content in your preferred language

Addition to Alfred Baldenweck's Annotation Idea

546
2
12-27-2024 07:06 AM
Status: Implemented
Labels (1)
HaydenWelch
MVP Regular Contributor

@AlfredBaldenweckproposed an easy way to update Annotation geometry using Arcpy, but knowing that the current Annotation implementation uses a CIM object stored in the Element Blob field of the annotation class, I don't see why that can't be expanded to give even more control over annotations using the existing workflows for CIM interaction using the arcpy.cim module.

Individual annotations in a class can be updated in the ArcPro UI using the Symbol button in the annotation attributes:

HaydenWelch_0-1735311653781.png

Since this is essentially just updating that stored CIM definition, why couldn't this be more transparently exposed to arcpy? The encoding of the data in that bytearray/memoryview object is opaque and seems to have leading and trailing bytes that differ based on annotation type, but it wouldn't be difficult for a developer that knows the spec to write a few classes (e.g. arcpy.Annotation) that handle that gracefully. There seems to be a stub type for Annotation in the arcobjects.geometries module:

HaydenWelch_1-1735311938099.png

So why hasn't this been implemented yet?

Tags (2)
2 Comments
CraigWilliams
Status changed to: Implemented

We implemented an approach for annotation in arcpy.da cursors in ArcGIS Pro 3.4 that uses an Annotation object tied with arcpy CIM access to fully expose the annotation feature content. See https://pro.arcgis.com/en/pro-app/latest/arcpy/classes/annotation.htm for more details.

HaydenWelch

@CraigWilliamsYou are the best, That was a really fast turnaround for a desperately needed feature