<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to set Halo property of label (ArcPy) in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-set-halo-property-of-label-arcpy/m-p/1050127#M60864</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;aprx = arcpy.mp.ArcGISProject("current")&lt;BR /&gt;m = aprx.listMaps("Map15")[0]&lt;/P&gt;&lt;P&gt;show_labels = m.listLayers("okolni_listy_ztm5*")[0]&lt;BR /&gt;show_labels.showLabels = True&lt;/P&gt;&lt;P&gt;for lyr in m.listLayers("okolni_listy_ztm5*"):&lt;BR /&gt;if lyr.supports("SHOWLABELS"):&lt;BR /&gt;if lyr.showLabels:&lt;BR /&gt;for lblClass in lyr.listLabelClasses():&lt;BR /&gt;lblClass.expression = "$feature.OBJECTID"&lt;BR /&gt;&lt;BR /&gt;label_show = m.listLayers('okolni_listy_ztm5*')[0]&lt;BR /&gt;l_cim = label_show.getDefinition('V2')&lt;BR /&gt;lc = l_cim.labelClasses[0]&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;lc.textSymbol.symbol.haloSize = 2&lt;BR /&gt;lc.textSymbol.symbol.haloSymbol =&amp;nbsp;&lt;/P&gt;&lt;P&gt;label_show.setDefinition(l_cim)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 22 Apr 2021 16:52:23 GMT</pubDate>
    <dc:creator>anyry</dc:creator>
    <dc:date>2021-04-22T16:52:23Z</dc:date>
    <item>
      <title>How to set Halo property of label (ArcPy)</title>
      <link>https://community.esri.com/t5/python-questions/how-to-set-halo-property-of-label-arcpy/m-p/1050127#M60864</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;aprx = arcpy.mp.ArcGISProject("current")&lt;BR /&gt;m = aprx.listMaps("Map15")[0]&lt;/P&gt;&lt;P&gt;show_labels = m.listLayers("okolni_listy_ztm5*")[0]&lt;BR /&gt;show_labels.showLabels = True&lt;/P&gt;&lt;P&gt;for lyr in m.listLayers("okolni_listy_ztm5*"):&lt;BR /&gt;if lyr.supports("SHOWLABELS"):&lt;BR /&gt;if lyr.showLabels:&lt;BR /&gt;for lblClass in lyr.listLabelClasses():&lt;BR /&gt;lblClass.expression = "$feature.OBJECTID"&lt;BR /&gt;&lt;BR /&gt;label_show = m.listLayers('okolni_listy_ztm5*')[0]&lt;BR /&gt;l_cim = label_show.getDefinition('V2')&lt;BR /&gt;lc = l_cim.labelClasses[0]&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;lc.textSymbol.symbol.haloSize = 2&lt;BR /&gt;lc.textSymbol.symbol.haloSymbol =&amp;nbsp;&lt;/P&gt;&lt;P&gt;label_show.setDefinition(l_cim)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 22 Apr 2021 16:52:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-set-halo-property-of-label-arcpy/m-p/1050127#M60864</guid>
      <dc:creator>anyry</dc:creator>
      <dc:date>2021-04-22T16:52:23Z</dc:date>
    </item>
  </channel>
</rss>

