Select to view content in your preferred language

arcpy.da.Walk: Add Annotation and Dimension to values for "type" parameter

503
2
01-16-2026 12:13 PM
Status: Open
AlfredBaldenweck
MVP Frequent Contributor

3.5

I'd like to be able to grab just annotation feature classes from my database using arcpy.da.Walk(). Right now, that is not possible.

Valid feature types are the following:

  • MultipatchMultipatch feature classes are returned.
     
  • MultipointMultipoint feature classes are returned.
     
  • PointPoint feature classes are returned.
     
  • PolygonPolygon feature classes are returned.
     
  • PolylinePolyline feature classes are returned.

The work around for this, then, is run a Describe() on every feature class to determine whether it is an Annotation.

The same problem exists for Dimensions.

I'm finding that you can get them if you filter to Polygons, but again, you have to run a describe or ListFields() to figure out if they're actually what you're looking for.

Please add both of them in to Walk().

 

2 Comments
DavidSolari

If nothing else that filter is completely wrong, annotations should appear under Point and dimensions under Polyline.

AlfredBaldenweck

Well, technically annotations are actually polygons in file geodatabases. You can copy the SHAPE field into a polygon feature class to get its footprint, although that changes with its symbology. Not sure how it is for dimensions but it's probably the same.

Funnily enough, they used to be lines in coverages, but that was most likely because the symbology and size of them was determined in the map instead of at the database level.

 

Edit: actually yeah dimensions function the same 

AlfredBaldenweck_0-1769800618256.png

 

So yeah I understand the technical reason annotations and dimensions are being returned as polygons, but we really should be able to filter for them specifically.