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)