<?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: Sketch tool geometry z-value in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/sketch-tool-geometry-z-value/m-p/1468482#M11534</link>
    <description>That was exactly what I was looking for.&lt;BR /&gt;Thanks you very much!!!&lt;BR /&gt;</description>
    <pubDate>Tue, 14 May 2024 22:04:19 GMT</pubDate>
    <dc:creator>JonathanDewalt</dc:creator>
    <dc:date>2024-05-14T22:04:19Z</dc:date>
    <item>
      <title>Sketch tool geometry z-value</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/sketch-tool-geometry-z-value/m-p/1466300#M11529</link>
      <description>&lt;P&gt;Hello, I am using the sketch tool to create and pass geometry to a function that will create a new polygon feature in a geodatabase that does not support z-values.&amp;nbsp; The problem is the sketch tool geometry Has a Z value and thus the code fails.&amp;nbsp; I would have thought this would be an easy fix but I have spent to much time trying to figure this out with no success.&amp;nbsp; &amp;nbsp;Anyone have any suggestions on how to remove the Z-Value from the incoming geometry or a way to prevent the sketch tool from creating the Z-value in the first place.&lt;/P&gt;&lt;P&gt;This is the basic code I am using and it fails when assigning the NewGeometry to the shapefield.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;using (RowBuffer rowBuffer = featClass.CreateRowBuffer())&lt;BR /&gt;{&lt;BR /&gt;rowBuffer[facilitySiteDefinition.GetShapeField()] = NewGeometry;&lt;BR /&gt;using (Feature newfeature = featClass.CreateRow(rowBuffer))&lt;BR /&gt;{&lt;BR /&gt;//To Indicate that the attribute table has to be updated&lt;BR /&gt;context.Invalidate(newfeature);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 16:23:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/sketch-tool-geometry-z-value/m-p/1466300#M11529</guid>
      <dc:creator>JonathanDewalt</dc:creator>
      <dc:date>2024-05-14T16:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch tool geometry z-value</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/sketch-tool-geometry-z-value/m-p/1468386#M11533</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Convert your sketched geometry to a polygon using PolygonBuilderEx.&amp;nbsp; Set the "HasZ" property to false. Like this:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var poly = geometry as Polygon;
var builderPoly = new PolygonBuilderEx(poly);
builderPoly.HasZ = false;&lt;/LI-CODE&gt;&lt;P&gt;And then create your new feature by using the ToGeometry method. Like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;rowBuffer[featureClass.GetDefinition().GetShapeField()] = builderPoly.ToGeometry();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 21:48:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/sketch-tool-geometry-z-value/m-p/1468386#M11533</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2024-05-14T21:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Sketch tool geometry z-value</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/sketch-tool-geometry-z-value/m-p/1468482#M11534</link>
      <description>That was exactly what I was looking for.&lt;BR /&gt;Thanks you very much!!!&lt;BR /&gt;</description>
      <pubDate>Tue, 14 May 2024 22:04:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/sketch-tool-geometry-z-value/m-p/1468482#M11534</guid>
      <dc:creator>JonathanDewalt</dc:creator>
      <dc:date>2024-05-14T22:04:19Z</dc:date>
    </item>
  </channel>
</rss>

