Select to view content in your preferred language

Labeling Feature class with different classes

285
2
Jump to solution
06-20-2024 09:47 AM
HusamOqer
New Contributor II

Hello everyone,

 

I am trying to automate showing the labeling for one of the layers using arcpy.

 

The layer has different classes and I want to show the labeling for each class differently. 

Any recommendations? 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
EdMorris
Esri Contributor

Hello

If you wish to automate this process then you can use ArcPy top get access to a layer in a map and use the createLabelClass() method on a Layer and set its properties for each class of feature within your layer.

Have a look at LabelClass Example 3 at this link to show you how to do this:

https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/labelclass-class.htm

Many thanks ed 

View solution in original post

2 Replies
EdMorris
Esri Contributor

Hello

If you wish to automate this process then you can use ArcPy top get access to a layer in a map and use the createLabelClass() method on a Layer and set its properties for each class of feature within your layer.

Have a look at LabelClass Example 3 at this link to show you how to do this:

https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/labelclass-class.htm

Many thanks ed 

HusamOqer
New Contributor II

Thanks for you reply! 

0 Kudos