Select to view content in your preferred language

Export out Label Expressions with ArcPy

460
1
11-27-2023 11:52 AM
EricBushee
Occasional Contributor

We often create a series of maps and figures in one aprx file, and as a form of QC we will export out layer information from a custom ArcPY script to a .csv file - things like data sources, definition queries, layer type, map name, layout name,etc., using the list.Layers method.

One thing we have not figured out how to export are label expressions for each layer. We often will have complex label expressions that need to be checked for each layer. Is there a way these can be exported to a csv file so that checking can be done in a single table, as opposed to clicking on each layer in the aprx file?

0 Kudos
1 Reply
DanPatterson
MVP Esteemed Contributor

Code sample 1 in

LabelClass—ArcGIS Pro | Documentation

you could modify it to collect out to a text file I am sure.


... sort of retired...
0 Kudos