Hello community,
I am writing a Python script in ArcGIS Pro to automate the generation of annotations using the Tiled Labels To Annotation tool. The generation part works perfectly.
However, I am stuck on the final step. I have hundreds of resulting annotation layers, and I need to programmatically enable the Page Query property (found in Layer Properties > Page Query) for each of them.
The Goal: I need the script to:
Enable the Page Query (Filter based on Map Series).
Set the matching field to "TileID".
The Issue: I cannot find the correct ArcPy method or the valid CIM path to toggle this specific setting. I attempted to modify the layer definition using lyr.getDefinition('V3') by looking for pageDefinition or CIMPageDefinition, but the changes do not persist or the property seems inaccessible for these specific annotation layers.
Does anyone have a working code snippet (CIM or ArcPy) to enable the Page Query and set the field name?
Environment:
ArcGIS Pro 3.x
Python 3
Thank you for your help!