<?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 Re: 'CURRENT' invalid when using Arcpy in Layer Labeling Properties Python expression in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/current-invalid-when-using-arcpy-in-layer-labeling/m-p/1485644#M70736</link>
    <description>&lt;P&gt;I have only seen examples using the LabelClass within the mp module as in the examples here&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/labelclass-class.htm" target="_blank"&gt;LabelClass—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I don't know if arcpy used to create expressions in the environment you show is possible since it doesn't access a project directly&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jun 2024 19:55:32 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2024-06-05T19:55:32Z</dc:date>
    <item>
      <title>'CURRENT' invalid when using Arcpy in Layer Labeling Properties Python expression</title>
      <link>https://community.esri.com/t5/python-questions/current-invalid-when-using-arcpy-in-layer-labeling/m-p/1485613#M70735</link>
      <description>&lt;P&gt;When attempting to use arcpy.mp.ArcGISProject('CURRENT') within a labeling properties class python expression a map drawing alert is generated although the expression is valid. I simplified the label logic to show just the key issue. &lt;A href="https://support.esri.com/en-us/knowledge-base/faq-is-it-possible-to-use-the-current-keyword-in-a-stan-000027431" target="_self"&gt;This technical support FAQ page&lt;/A&gt; indicates that&amp;nbsp;arcpy.mp.ArcGISProject('CURRENT') returns the OSError when ran in a standalone environment. I am trying to run this in the ArcGIS Pro labeling properties. T&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/guidelines-for-arcpy-mapping.htm#:~:text=Reference%20a%20project,the%20CURRENT%20keyword." target="_self"&gt;his Arcpy documentation&lt;/A&gt; doesn't designate that labeling properties is outside of the application. Is labeling properties somehow considered a standalone environment, even though it appears to be within ArcGIS Pro? &lt;A href="https://community.esri.com/t5/user/viewprofilepage/user-id/746669" target="_blank" rel="noopener"&gt;@ShareUser&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gis_bCapell_0-1717614586260.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/106297i662E567AF4EA2E2A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="gis_bCapell_0-1717614586260.png" alt="gis_bCapell_0-1717614586260.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2024 19:17:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/current-invalid-when-using-arcpy-in-layer-labeling/m-p/1485613#M70735</guid>
      <dc:creator>BenCapell_NWTF10</dc:creator>
      <dc:date>2024-06-05T19:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: 'CURRENT' invalid when using Arcpy in Layer Labeling Properties Python expression</title>
      <link>https://community.esri.com/t5/python-questions/current-invalid-when-using-arcpy-in-layer-labeling/m-p/1485644#M70736</link>
      <description>&lt;P&gt;I have only seen examples using the LabelClass within the mp module as in the examples here&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/labelclass-class.htm" target="_blank"&gt;LabelClass—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I don't know if arcpy used to create expressions in the environment you show is possible since it doesn't access a project directly&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2024 19:55:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/current-invalid-when-using-arcpy-in-layer-labeling/m-p/1485644#M70736</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2024-06-05T19:55:32Z</dc:date>
    </item>
  </channel>
</rss>

