<?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: Setting elevation using arcpy in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/setting-elevation-using-arcpy/m-p/1266737#M66523</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;There is no out of the box property available but you can backdoor it by updating the CIM for the layer. Here's a sample that sets it to the geometry Z values. If you need to set it to a field just use $feature.fieldname instead of Shape.Z&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Reference a project, map, and layer using arcpy.mp
p = arcpy.mp.ArcGISProject('current')
m = p.listMaps('Scene')[0]
l = m.listLayers('FewPoints')[0]
# Return the layer's CIM definition
l_cim = l.getDefinition('V2')
# Set the layer elevation to relative to ground based on Z values
l_cim.featureElevationExpression="Shape.Z"
#Push the changes back to the layer
l.setDefinition(l_cim)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Mar 2023 22:55:46 GMT</pubDate>
    <dc:creator>Andrew--Johnson</dc:creator>
    <dc:date>2023-03-10T22:55:46Z</dc:date>
    <item>
      <title>Setting elevation using arcpy</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/setting-elevation-using-arcpy/m-p/1266618#M66517</link>
      <description>&lt;P&gt;Hello! I am currently developing a standalone python script to create a 3D scene. The points that I am plotting have a height component relative to the ground. Currently, my default for ground elevation is set to absolute and I need to manually change it to relative to the ground. Any suggestions on how to this using arcpy? I've been searching but not much luck. Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 19:26:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/setting-elevation-using-arcpy/m-p/1266618#M66517</guid>
      <dc:creator>saldanax</dc:creator>
      <dc:date>2023-03-10T19:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Setting elevation using arcpy</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/setting-elevation-using-arcpy/m-p/1266737#M66523</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;There is no out of the box property available but you can backdoor it by updating the CIM for the layer. Here's a sample that sets it to the geometry Z values. If you need to set it to a field just use $feature.fieldname instead of Shape.Z&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Reference a project, map, and layer using arcpy.mp
p = arcpy.mp.ArcGISProject('current')
m = p.listMaps('Scene')[0]
l = m.listLayers('FewPoints')[0]
# Return the layer's CIM definition
l_cim = l.getDefinition('V2')
# Set the layer elevation to relative to ground based on Z values
l_cim.featureElevationExpression="Shape.Z"
#Push the changes back to the layer
l.setDefinition(l_cim)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 22:55:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/setting-elevation-using-arcpy/m-p/1266737#M66523</guid>
      <dc:creator>Andrew--Johnson</dc:creator>
      <dc:date>2023-03-10T22:55:46Z</dc:date>
    </item>
  </channel>
</rss>

