How to set Halo property of label (ArcPy)

818
0
04-22-2021 08:40 AM
anyry
by
New Contributor III

 

I don't know how to set halo property in Python. I try it by CIM (code below) but I don't know, what line "lc.textSymbol.symbol.haloSymbol" should contain. Can you advise me how to achieve halo effect using arcpy?

 

aprx = arcpy.mp.ArcGISProject("current")
m = aprx.listMaps("Map15")[0]

show_labels = m.listLayers("okolni_listy_ztm5*")[0]
show_labels.showLabels = True

for lyr in m.listLayers("okolni_listy_ztm5*"):
if lyr.supports("SHOWLABELS"):
if lyr.showLabels:
for lblClass in lyr.listLabelClasses():
lblClass.expression = "$feature.OBJECTID"

label_show = m.listLayers('okolni_listy_ztm5*')[0]
l_cim = label_show.getDefinition('V2')
lc = l_cim.labelClasses[0]


lc.textSymbol.symbol.haloSize = 2
lc.textSymbol.symbol.haloSymbol = 

label_show.setDefinition(l_cim)

 Thanks

0 Kudos
0 Replies