<?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 Why won't Label Class properties appear in Map after python modification? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/why-won-t-label-class-properties-appear-in-map/m-p/155062#M6947</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;I'm trying to use python to assign properties to a label class to a layer in my map in ArcGIS Pro 2.2.1, and no matter what I do, the changed properties do not appear when I examine the Label Class in the map. Below is an example of my code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal,monaco,monospace;"&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal,monaco,monospace;"&gt;aprx = arcpy.mp.ArcGISProject(r"C:\Users\maxwell.reis\Desktop\USACE\Working_Map\Working_Map.aprx")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal,monaco,monospace;"&gt;m = aprx.listMaps("Map")[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal,monaco,monospace;"&gt;lyr = m.listLayers("TEMP_lyr")[0]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal,monaco,monospace;"&gt;print(lyr.listLabelClasses("Class 1")[0].expression)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal,monaco,monospace;"&gt;lblClass = lyr.listLabelClasses("Class 1")[0]&lt;BR /&gt;lblClass.expression = "$feature.PARNAME"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal,monaco,monospace;"&gt;print(lyr.listLabelClasses("Class 1")[0].expression)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal,monaco,monospace;"&gt;aprx.save()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;The first print line correctly displays the label class expression of the layer in the map, and the second print line shows that the expression has successfully changed. However, when I go into the map to view the label class properties, nothing has changed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;Am I missing a step in the process? Is there another statement I need to make in python to get the map to recognize the updated Label Class Properties?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Sep 2018 13:43:32 GMT</pubDate>
    <dc:creator>MaxReis</dc:creator>
    <dc:date>2018-09-26T13:43:32Z</dc:date>
    <item>
      <title>Why won't Label Class properties appear in Map after python modification?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/why-won-t-label-class-properties-appear-in-map/m-p/155062#M6947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;I'm trying to use python to assign properties to a label class to a layer in my map in ArcGIS Pro 2.2.1, and no matter what I do, the changed properties do not appear when I examine the Label Class in the map. Below is an example of my code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal,monaco,monospace;"&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal,monaco,monospace;"&gt;aprx = arcpy.mp.ArcGISProject(r"C:\Users\maxwell.reis\Desktop\USACE\Working_Map\Working_Map.aprx")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal,monaco,monospace;"&gt;m = aprx.listMaps("Map")[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal,monaco,monospace;"&gt;lyr = m.listLayers("TEMP_lyr")[0]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal,monaco,monospace;"&gt;print(lyr.listLabelClasses("Class 1")[0].expression)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal,monaco,monospace;"&gt;lblClass = lyr.listLabelClasses("Class 1")[0]&lt;BR /&gt;lblClass.expression = "$feature.PARNAME"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal,monaco,monospace;"&gt;print(lyr.listLabelClasses("Class 1")[0].expression)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal,monaco,monospace;"&gt;aprx.save()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;The first print line correctly displays the label class expression of the layer in the map, and the second print line shows that the expression has successfully changed. However, when I go into the map to view the label class properties, nothing has changed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: tahoma,arial,helvetica,sans-serif;"&gt;Am I missing a step in the process? Is there another statement I need to make in python to get the map to recognize the updated Label Class Properties?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2018 13:43:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/why-won-t-label-class-properties-appear-in-map/m-p/155062#M6947</guid>
      <dc:creator>MaxReis</dc:creator>
      <dc:date>2018-09-26T13:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: Why won't Label Class properties appear in Map after python modification?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/why-won-t-label-class-properties-appear-in-map/m-p/155063#M6948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just to confirm... ArcGIS Pro is not open when you are doing this and you open that project and check to see if the change was persisted to the map?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2018 14:49:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/why-won-t-label-class-properties-appear-in-map/m-p/155063#M6948</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-09-26T14:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: Why won't Label Class properties appear in Map after python modification?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/why-won-t-label-class-properties-appear-in-map/m-p/155064#M6949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As a test can you try a Save As to a new aprx file name and see if the label class properties change there?&amp;nbsp; Not an ideal solution if this works due to the structure of Pro where each aprx is tied to a file gdb so this solution could get messy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2018 14:57:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/why-won-t-label-class-properties-appear-in-map/m-p/155064#M6949</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2018-09-26T14:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Why won't Label Class properties appear in Map after python modification?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/why-won-t-label-class-properties-appear-in-map/m-p/155065#M6950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The opposite; I am doing this in the Python window within ArcGIS Pro.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2018 14:59:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/why-won-t-label-class-properties-appear-in-map/m-p/155065#M6950</guid>
      <dc:creator>MaxReis</dc:creator>
      <dc:date>2018-09-26T14:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: Why won't Label Class properties appear in Map after python modification?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/why-won-t-label-class-properties-appear-in-map/m-p/155066#M6951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;then you want "Current" aprx&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/arcpy/mapping/guidelines-for-arcpy-mapping.htm" title="http://pro.arcgis.com/en/pro-app/arcpy/mapping/guidelines-for-arcpy-mapping.htm"&gt;Guidelines for arcpy.mp—ArcPy | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;not the one on disk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2018 16:12:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/why-won-t-label-class-properties-appear-in-map/m-p/155066#M6951</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-09-26T16:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: Why won't Label Class properties appear in Map after python modification?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/why-won-t-label-class-properties-appear-in-map/m-p/155067#M6952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, that did the trick!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2018 16:59:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/why-won-t-label-class-properties-appear-in-map/m-p/155067#M6952</guid>
      <dc:creator>MaxReis</dc:creator>
      <dc:date>2018-09-26T16:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Why won't Label Class properties appear in Map after python modification?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/why-won-t-label-class-properties-appear-in-map/m-p/155068#M6953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Max, you might want to mark the correct answer so that other people know that a resolution was obtained.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2018 20:13:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/why-won-t-label-class-properties-appear-in-map/m-p/155068#M6953</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-09-26T20:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: Why won't Label Class properties appear in Map after python modification?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/why-won-t-label-class-properties-appear-in-map/m-p/1485631#M84215</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1066"&gt;@DanPatterson_Retired&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/215600"&gt;@DanPatterson&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;What do you make of this below? Thanks for all of your contributions!&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-questions/current-invalid-when-using-arcpy-in-layer-labeling/td-p/1485613" target="_blank"&gt;'CURRENT' invalid when using Arcpy in Layer Labeli... - Esri Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2024 19:18:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/why-won-t-label-class-properties-appear-in-map/m-p/1485631#M84215</guid>
      <dc:creator>BenCapell_NWTF10</dc:creator>
      <dc:date>2024-06-05T19:18:53Z</dc:date>
    </item>
  </channel>
</rss>

