<?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 An attempt to Enable Symbol Layer Drawing with arcpy in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/an-attempt-to-enable-symbol-layer-drawing-with/m-p/1658558#M74779</link>
    <description>&lt;P&gt;As part of larger process I'm trying to &lt;STRONG&gt;Enable Symbol Layer Drawing&lt;/STRONG&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;I tried using the CIM through the &lt;A href="https://github.com/Esri/cim-spec/blob/main/docs/v3/CIMLayer.md#cimsymbollayerdrawing" target="_self"&gt;Layer class&lt;/A&gt;, which didn't work (I may have set it up wrong) and I foolishly deleted my code out of annoyance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. I also tried using the renderer (without the CIM):&lt;/P&gt;&lt;LI-CODE lang="python"&gt;sym = lyr.symbology 
sym.updateRenderer('UniqueValueRenderer') 
sym.renderer.enableSymbolLayerDrawing = True
lyr.symbology = sym &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Here's my full code currently:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy

aprx = arcpy.mp.ArcGISProject("CURRENT")
m = aprx.listMaps(map_name)[0]
lyr = m.listLayers(layer_name)[0]
cim_lyr = lyr.getDefinition("V3")

for lblClass in cim_lyr.labelClasses:
    lblClass.expressionEngine = "VBScript"
    lblClass.expression = '"&amp;lt;FNT name=\'Arial\' style=\'Bold\' size=\'8\'&amp;gt;&amp;lt;CLR red=\'255\' green=\'255\' blue=\'255\'&amp;gt;" &amp;amp; [ParcelID] &amp;amp; vbNewLine &amp;amp; [OpCo] &amp;amp; " " &amp;amp; [TypeOfUse] &amp;amp; "&amp;lt;/CLR&amp;gt;&amp;lt;/FNT&amp;gt;"'

    if not lblClass.maplexLabelPlacementProperties:
        lblClass.maplexLabelPlacementProperties = arcpy.cim.CreateCIMObjectFromClassName('CIMMaplexLabelPlacementProperties', 'V3')

    lblClass.maplexLabelPlacementProperties.polygonFeatureType = "LandParcel"
    lblClass.maplexLabelPlacementProperties.polygonPlacementMethod = "StraightInPolygon"
    lblClass.maplexLabelPlacementProperties.preferHorizontalPlacement = True
    lblClass.maplexLabelPlacementProperties.multiPartOption = "OneLabelPerPart"
    
    lblClass.maplexLabelPlacementProperties.featureWeight = 0
    lblClass.maplexLabelPlacementProperties.labelWeight = 0 
    lblClass.maplexLabelPlacementProperties.polygonBoundaryWeight = 0
    lblClass.maplexLabelPlacementProperties.avoidOverlappingLabeledPolygonsAsIfHoles = True
    lblClass.maplexLabelPlacementProperties.canRemoveOverlappingLabel = False
    lblClass.maplexLabelPlacementProperties.canPlaceLabelOnTopOfFeature = True
    lblClass.maplexLabelPlacementProperties.canOverrunFeature = True
    lblClass.maplexLabelPlacementProperties.canPlaceLabelOutsidePolygon = False
    lblClass.maplexLabelPlacementProperties.backgroundLabel = True

    lblClass.visibility = True
    lblClass.priority = 0 

sym = lyr.symbology
sym.renderer.enableSymbolLayerDrawing = True

lyr.showLabels = True
m.enableMaplex = True

lyr.symbology = sym
lyr.setDefinition(cim_lyr)
print(f" Label settings updated for {layer_name}")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas or thoughts are appreciated!&lt;/P&gt;&lt;P&gt;- Daniel&lt;/P&gt;</description>
    <pubDate>Thu, 16 Oct 2025 20:16:36 GMT</pubDate>
    <dc:creator>nsidaniel</dc:creator>
    <dc:date>2025-10-16T20:16:36Z</dc:date>
    <item>
      <title>An attempt to Enable Symbol Layer Drawing with arcpy</title>
      <link>https://community.esri.com/t5/python-questions/an-attempt-to-enable-symbol-layer-drawing-with/m-p/1658558#M74779</link>
      <description>&lt;P&gt;As part of larger process I'm trying to &lt;STRONG&gt;Enable Symbol Layer Drawing&lt;/STRONG&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;I tried using the CIM through the &lt;A href="https://github.com/Esri/cim-spec/blob/main/docs/v3/CIMLayer.md#cimsymbollayerdrawing" target="_self"&gt;Layer class&lt;/A&gt;, which didn't work (I may have set it up wrong) and I foolishly deleted my code out of annoyance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. I also tried using the renderer (without the CIM):&lt;/P&gt;&lt;LI-CODE lang="python"&gt;sym = lyr.symbology 
sym.updateRenderer('UniqueValueRenderer') 
sym.renderer.enableSymbolLayerDrawing = True
lyr.symbology = sym &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Here's my full code currently:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy

aprx = arcpy.mp.ArcGISProject("CURRENT")
m = aprx.listMaps(map_name)[0]
lyr = m.listLayers(layer_name)[0]
cim_lyr = lyr.getDefinition("V3")

for lblClass in cim_lyr.labelClasses:
    lblClass.expressionEngine = "VBScript"
    lblClass.expression = '"&amp;lt;FNT name=\'Arial\' style=\'Bold\' size=\'8\'&amp;gt;&amp;lt;CLR red=\'255\' green=\'255\' blue=\'255\'&amp;gt;" &amp;amp; [ParcelID] &amp;amp; vbNewLine &amp;amp; [OpCo] &amp;amp; " " &amp;amp; [TypeOfUse] &amp;amp; "&amp;lt;/CLR&amp;gt;&amp;lt;/FNT&amp;gt;"'

    if not lblClass.maplexLabelPlacementProperties:
        lblClass.maplexLabelPlacementProperties = arcpy.cim.CreateCIMObjectFromClassName('CIMMaplexLabelPlacementProperties', 'V3')

    lblClass.maplexLabelPlacementProperties.polygonFeatureType = "LandParcel"
    lblClass.maplexLabelPlacementProperties.polygonPlacementMethod = "StraightInPolygon"
    lblClass.maplexLabelPlacementProperties.preferHorizontalPlacement = True
    lblClass.maplexLabelPlacementProperties.multiPartOption = "OneLabelPerPart"
    
    lblClass.maplexLabelPlacementProperties.featureWeight = 0
    lblClass.maplexLabelPlacementProperties.labelWeight = 0 
    lblClass.maplexLabelPlacementProperties.polygonBoundaryWeight = 0
    lblClass.maplexLabelPlacementProperties.avoidOverlappingLabeledPolygonsAsIfHoles = True
    lblClass.maplexLabelPlacementProperties.canRemoveOverlappingLabel = False
    lblClass.maplexLabelPlacementProperties.canPlaceLabelOnTopOfFeature = True
    lblClass.maplexLabelPlacementProperties.canOverrunFeature = True
    lblClass.maplexLabelPlacementProperties.canPlaceLabelOutsidePolygon = False
    lblClass.maplexLabelPlacementProperties.backgroundLabel = True

    lblClass.visibility = True
    lblClass.priority = 0 

sym = lyr.symbology
sym.renderer.enableSymbolLayerDrawing = True

lyr.showLabels = True
m.enableMaplex = True

lyr.symbology = sym
lyr.setDefinition(cim_lyr)
print(f" Label settings updated for {layer_name}")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas or thoughts are appreciated!&lt;/P&gt;&lt;P&gt;- Daniel&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2025 20:16:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/an-attempt-to-enable-symbol-layer-drawing-with/m-p/1658558#M74779</guid>
      <dc:creator>nsidaniel</dc:creator>
      <dc:date>2025-10-16T20:16:36Z</dc:date>
    </item>
  </channel>
</rss>

