<?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 ArcPy SHAPE, SHAPE_Area, SHAPE_Length fields are always VISIBLE, why? in Python Snippets Questions</title>
    <link>https://community.esri.com/t5/python-snippets-questions/arcpy-shape-shape-area-shape-length-fields-are/m-p/739132#M39</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to write unit tests that will ensure all SHAPE related fields within an MXD are hidden. However, even if the SHAPE field visibility is unchecked within the &lt;EM&gt;ArcMAP -&amp;gt; Layer Properties -&amp;gt; Fields -&amp;gt; "Choose which fields will be visible&lt;/EM&gt;" GUI, it seems impossible to read/access this state in ArcPY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following will all return "VISIBLE" rather than "HIDDEN" even if they have been hidden (as above):&lt;/P&gt;&lt;P&gt;arcpy.Describe(lyr).fieldInfo.getVisible(arcpy.Describe(lyr).fieldInfo.findFieldByName("SHAPE"))&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;arcpy.Describe(lyr).fieldInfo.getVisible(arcpy.Describe(lyr).fieldInfo.findFieldByName(&lt;/SPAN&gt;&lt;SPAN&gt;"SHAPE_Area"&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;arcpy.Describe(lyr).fieldInfo.getVisible(arcpy.Describe(lyr).fieldInfo.findFieldByName(&lt;/SPAN&gt;&lt;SPAN&gt;"SHAPE_Length"&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In addition, Non-SHAPE related fields all return a result that always correlates&amp;nbsp;to what is seen in the GUI.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;arcpy.Describe(lyr).fieldInfo.getVisible(arcpy.Describe(lyr).fieldInfo.findFieldByName(&lt;SPAN&gt;"MY_HIDDEN_FIELD"&lt;/SPAN&gt;&lt;SPAN&gt;)) will return "HIDDEN".&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I could jump to some conclusion blindly about why this is logical, however it would be far better to have any such explanation&amp;nbsp;added to the documentation currently @&amp;nbsp;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/arcpy/classes/fieldinfo.htm" title="http://pro.arcgis.com/en/pro-app/arcpy/classes/fieldinfo.htm"&gt;FieldInfo—ArcPy classes | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any help/explanation/workaround would be greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Oct 2018 03:21:53 GMT</pubDate>
    <dc:creator>GISAdmin35</dc:creator>
    <dc:date>2018-10-17T03:21:53Z</dc:date>
    <item>
      <title>ArcPy SHAPE, SHAPE_Area, SHAPE_Length fields are always VISIBLE, why?</title>
      <link>https://community.esri.com/t5/python-snippets-questions/arcpy-shape-shape-area-shape-length-fields-are/m-p/739132#M39</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to write unit tests that will ensure all SHAPE related fields within an MXD are hidden. However, even if the SHAPE field visibility is unchecked within the &lt;EM&gt;ArcMAP -&amp;gt; Layer Properties -&amp;gt; Fields -&amp;gt; "Choose which fields will be visible&lt;/EM&gt;" GUI, it seems impossible to read/access this state in ArcPY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following will all return "VISIBLE" rather than "HIDDEN" even if they have been hidden (as above):&lt;/P&gt;&lt;P&gt;arcpy.Describe(lyr).fieldInfo.getVisible(arcpy.Describe(lyr).fieldInfo.findFieldByName("SHAPE"))&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;arcpy.Describe(lyr).fieldInfo.getVisible(arcpy.Describe(lyr).fieldInfo.findFieldByName(&lt;/SPAN&gt;&lt;SPAN&gt;"SHAPE_Area"&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;arcpy.Describe(lyr).fieldInfo.getVisible(arcpy.Describe(lyr).fieldInfo.findFieldByName(&lt;/SPAN&gt;&lt;SPAN&gt;"SHAPE_Length"&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In addition, Non-SHAPE related fields all return a result that always correlates&amp;nbsp;to what is seen in the GUI.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;arcpy.Describe(lyr).fieldInfo.getVisible(arcpy.Describe(lyr).fieldInfo.findFieldByName(&lt;SPAN&gt;"MY_HIDDEN_FIELD"&lt;/SPAN&gt;&lt;SPAN&gt;)) will return "HIDDEN".&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I could jump to some conclusion blindly about why this is logical, however it would be far better to have any such explanation&amp;nbsp;added to the documentation currently @&amp;nbsp;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/arcpy/classes/fieldinfo.htm" title="http://pro.arcgis.com/en/pro-app/arcpy/classes/fieldinfo.htm"&gt;FieldInfo—ArcPy classes | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any help/explanation/workaround would be greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 03:21:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/arcpy-shape-shape-area-shape-length-fields-are/m-p/739132#M39</guid>
      <dc:creator>GISAdmin35</dc:creator>
      <dc:date>2018-10-17T03:21:53Z</dc:date>
    </item>
  </channel>
</rss>

