<?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: Python and ArcGIS Pro 2.2 in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/python-and-arcgis-pro-2-2/m-p/1264968#M66320</link>
    <description>&lt;P&gt;George,&lt;/P&gt;&lt;P&gt;I don't have the answer for you offhand, but I did notice a couple items that you may want to consider.&lt;/P&gt;&lt;P&gt;First, make sure that facilityNumber is a text value and not a numerical value.&amp;nbsp; Searching for 999 as an integer is not the same as searching for '999' as a text value.&lt;/P&gt;&lt;P&gt;Second,&amp;nbsp; lyr.showLabels is a true or false value which toggles&amp;nbsp; labels on or off for a given layer.&amp;nbsp; It is not the underlying definition query.&lt;/P&gt;&lt;P&gt;Check out&amp;nbsp; &lt;A href="https://community.esri.com/t5/python-questions/labels-still-not-visible-after-setting-lyr/m-p/378362#M29854" target="_blank"&gt;https://community.esri.com/t5/python-questions/labels-still-not-visible-after-setting-lyr/m-p/378362#M29854&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This might be a useful thread&lt;/P&gt;</description>
    <pubDate>Tue, 07 Mar 2023 16:18:46 GMT</pubDate>
    <dc:creator>LyonMNGIS</dc:creator>
    <dc:date>2023-03-07T16:18:46Z</dc:date>
    <item>
      <title>Python and ArcGIS Pro 2.2</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-and-arcgis-pro-2-2/m-p/1264715#M66296</link>
      <description>&lt;P&gt;Hi all, i'm trying to set a label constraint to only label only those features that are not assigned to 999. So far my code doesn't work but I've tried the following below:&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;aprx = arcpy.mp.ArcGISProject("CURRENT")&lt;BR /&gt;qry = "facilityNumber &amp;lt;&amp;gt; '999'"&lt;BR /&gt;for map in aprx.listMaps():&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;for lyr in map.listLayers():&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if lyr.supports("SHOWLABELS"):&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if lyr.showLabels == qry:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print("Layer name: " + lyr.name)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for lblClass in lyr.listLabelClasses():&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print("\t Class Name: \t" + lblClass.name)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;print("\t Expression: \t" + lblClass.expression)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print("\t SQL Query: \t" + lblClass.SQLQuery)&lt;BR /&gt;del aprx&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 20:54:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-and-arcgis-pro-2-2/m-p/1264715#M66296</guid>
      <dc:creator>GeorgeJones9282</dc:creator>
      <dc:date>2023-03-06T20:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Python and ArcGIS Pro 2.2</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/python-and-arcgis-pro-2-2/m-p/1264968#M66320</link>
      <description>&lt;P&gt;George,&lt;/P&gt;&lt;P&gt;I don't have the answer for you offhand, but I did notice a couple items that you may want to consider.&lt;/P&gt;&lt;P&gt;First, make sure that facilityNumber is a text value and not a numerical value.&amp;nbsp; Searching for 999 as an integer is not the same as searching for '999' as a text value.&lt;/P&gt;&lt;P&gt;Second,&amp;nbsp; lyr.showLabels is a true or false value which toggles&amp;nbsp; labels on or off for a given layer.&amp;nbsp; It is not the underlying definition query.&lt;/P&gt;&lt;P&gt;Check out&amp;nbsp; &lt;A href="https://community.esri.com/t5/python-questions/labels-still-not-visible-after-setting-lyr/m-p/378362#M29854" target="_blank"&gt;https://community.esri.com/t5/python-questions/labels-still-not-visible-after-setting-lyr/m-p/378362#M29854&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This might be a useful thread&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 16:18:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/python-and-arcgis-pro-2-2/m-p/1264968#M66320</guid>
      <dc:creator>LyonMNGIS</dc:creator>
      <dc:date>2023-03-07T16:18:46Z</dc:date>
    </item>
  </channel>
</rss>

