<?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: How do i update the geometry of polyline?? once i created it, and add it to the graphics layer. in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/how-do-i-update-the-geometry-of-polyline-once-i/m-p/55257#M577</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In that case you can create new Polyline and replace Graphic.Geometry with that one. In ArcGIS Runtime for .NET, geometries are immutable object so you can just replace the exiting geometry with new one. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So on higher level you can do it like this&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Graphic graphic = GetMyWorkingGraphic(); // existing Graphic with geometry that you want to replace / edit
Polyline polyline = CreateNewPolylineWithChanges(); // create new geometry with the changes
graphic.Geometry = polyline; // set geometry with changes to the graphic&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To see how to create geometries in code, please see samples&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/master/src/Desktop/ArcGISRuntimeSDKDotNet_DesktopSamples/Samples/Geometry/CreatePolylines.xaml.cs" title="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/master/src/Desktop/ArcGISRuntimeSDKDotNet_DesktopSamples/Samples/Geometry/CreatePolylines.xaml.cs" rel="nofollow noopener noreferrer" target="_blank"&gt;arcgis-runtime-samples-dotnet/CreatePolylines.xaml.cs at master · Esri/arcgis-runtime-samples-dotnet · GitHub&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/master/src/Desktop/ArcGISRuntimeSDKDotNet_DesktopSamples/Samples/Geometry/CreatePolygons.xaml.cs" title="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/master/src/Desktop/ArcGISRuntimeSDKDotNet_DesktopSamples/Samples/Geometry/CreatePolygons.xaml.cs" rel="nofollow noopener noreferrer" target="_blank"&gt;arcgis-runtime-samples-dotnet/CreatePolygons.xaml.cs at master · Esri/arcgis-runtime-samples-dotnet · GitHub&amp;nbsp; &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/master/src/Desktop/ArcGISRuntimeSDKDotNet_DesktopSamples/Samples/Geometry/CreatePoints.xaml.cs" title="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/master/src/Desktop/ArcGISRuntimeSDKDotNet_DesktopSamples/Samples/Geometry/CreatePoints.xaml.cs" rel="nofollow noopener noreferrer" target="_blank"&gt;arcgis-runtime-samples-dotnet/CreatePoints.xaml.cs at master · Esri/arcgis-runtime-samples-dotnet · GitHub&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 22:06:15 GMT</pubDate>
    <dc:creator>AnttiKajanus1</dc:creator>
    <dc:date>2021-12-10T22:06:15Z</dc:date>
    <item>
      <title>How do i update the geometry of polyline?? once i created it, and add it to the graphics layer.</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-do-i-update-the-geometry-of-polyline-once-i/m-p/55254#M574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have no idea how i can implement it...&lt;/P&gt;&lt;P&gt;does anyone have an idea?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to access the point list or anything else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 14:04:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-do-i-update-the-geometry-of-polyline-once-i/m-p/55254#M574</guid>
      <dc:creator>ShaharBukra</dc:creator>
      <dc:date>2014-11-25T14:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do i update the geometry of polyline?? once i created it, and add it to the graphics layer.</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-do-i-update-the-geometry-of-polyline-once-i/m-p/55255#M575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please see guide documentation : &lt;A href="https://developers.arcgis.com/net/desktop/guide/edit-features.htm" title="https://developers.arcgis.com/net/desktop/guide/edit-features.htm"&gt;Edit features—ArcGIS Runtime SDK for .NET | ArcGIS for Developers&lt;/A&gt; and online sample &lt;A href="https://developers.arcgis.com/net/desktop/api-reference//html/4803e224-52fb-4f82-9d96-5135655837d9.htm" title="https://developers.arcgis.com/net/desktop/api-reference//html/4803e224-52fb-4f82-9d96-5135655837d9.htm"&gt;Code Example - Editor_Sketching&lt;/A&gt;&amp;nbsp; or &lt;A href="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/master/src/Desktop/ArcGISRuntimeSDKDotNet_DesktopSamples/Samples/Editing/FeatureLayerEditGeometry.xaml"&gt;https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/master/src/Desktop/ArcGISRuntimeSDKDotNet_DesktopSamples/Samples/Editing/FeatureLayerEditGeometry.xaml&lt;/A&gt;‌ sample from samples reporsitory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Key points here are using Editor class to edit existing geometry and then save that to geodatabase / feature service if needed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you have following questions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 14:22:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-do-i-update-the-geometry-of-polyline-once-i/m-p/55255#M575</guid>
      <dc:creator>AnttiKajanus1</dc:creator>
      <dc:date>2014-11-25T14:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do i update the geometry of polyline?? once i created it, and add it to the graphics layer.</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-do-i-update-the-geometry-of-polyline-once-i/m-p/55256#M576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;Thanks for your answer but...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i dont want to save it for any local saving,&lt;/P&gt;&lt;P&gt;i want to change the one point of the line,&lt;/P&gt;&lt;P&gt;if i have line with point [(x1,y1),(x2,y2)] i want to edit it in code to be &lt;SPAN style="font-size: 14.3999996185303px;"&gt;[(x1,y1),(x3,y3)]&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Nov 2014 14:26:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-do-i-update-the-geometry-of-polyline-once-i/m-p/55256#M576</guid>
      <dc:creator>ShaharBukra</dc:creator>
      <dc:date>2014-11-25T14:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do i update the geometry of polyline?? once i created it, and add it to the graphics layer.</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-do-i-update-the-geometry-of-polyline-once-i/m-p/55257#M577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In that case you can create new Polyline and replace Graphic.Geometry with that one. In ArcGIS Runtime for .NET, geometries are immutable object so you can just replace the exiting geometry with new one. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So on higher level you can do it like this&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Graphic graphic = GetMyWorkingGraphic(); // existing Graphic with geometry that you want to replace / edit
Polyline polyline = CreateNewPolylineWithChanges(); // create new geometry with the changes
graphic.Geometry = polyline; // set geometry with changes to the graphic&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To see how to create geometries in code, please see samples&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/master/src/Desktop/ArcGISRuntimeSDKDotNet_DesktopSamples/Samples/Geometry/CreatePolylines.xaml.cs" title="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/master/src/Desktop/ArcGISRuntimeSDKDotNet_DesktopSamples/Samples/Geometry/CreatePolylines.xaml.cs" rel="nofollow noopener noreferrer" target="_blank"&gt;arcgis-runtime-samples-dotnet/CreatePolylines.xaml.cs at master · Esri/arcgis-runtime-samples-dotnet · GitHub&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/master/src/Desktop/ArcGISRuntimeSDKDotNet_DesktopSamples/Samples/Geometry/CreatePolygons.xaml.cs" title="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/master/src/Desktop/ArcGISRuntimeSDKDotNet_DesktopSamples/Samples/Geometry/CreatePolygons.xaml.cs" rel="nofollow noopener noreferrer" target="_blank"&gt;arcgis-runtime-samples-dotnet/CreatePolygons.xaml.cs at master · Esri/arcgis-runtime-samples-dotnet · GitHub&amp;nbsp; &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/master/src/Desktop/ArcGISRuntimeSDKDotNet_DesktopSamples/Samples/Geometry/CreatePoints.xaml.cs" title="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/master/src/Desktop/ArcGISRuntimeSDKDotNet_DesktopSamples/Samples/Geometry/CreatePoints.xaml.cs" rel="nofollow noopener noreferrer" target="_blank"&gt;arcgis-runtime-samples-dotnet/CreatePoints.xaml.cs at master · Esri/arcgis-runtime-samples-dotnet · GitHub&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:06:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-do-i-update-the-geometry-of-polyline-once-i/m-p/55257#M577</guid>
      <dc:creator>AnttiKajanus1</dc:creator>
      <dc:date>2021-12-10T22:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do i update the geometry of polyline?? once i created it, and add it to the graphics layer.</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-do-i-update-the-geometry-of-polyline-once-i/m-p/55258#M578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Antti!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand what you say,&lt;/P&gt;&lt;P&gt;Do you have any idea how to take my current polyline and extract the points from it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks again!&lt;/P&gt;&lt;P&gt;Shahar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Nov 2014 05:51:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-do-i-update-the-geometry-of-polyline-once-i/m-p/55258#M578</guid>
      <dc:creator>ShaharBukra</dc:creator>
      <dc:date>2014-11-26T05:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do i update the geometry of polyline?? once i created it, and add it to the graphics layer.</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-do-i-update-the-geometry-of-polyline-once-i/m-p/55259#M579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry I missed that part from the last reply. Easiest way is to use PolylineBuilder class. It works basically like StringBuilder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;PolylineBuilder builder = new PolylineBuilder(polyline); // Create new builder from existing polyline
builder.AddPoint(new MapPoint(x3, y3, polyline.SpatialReference)); // how to add new point to end of the polyline
builder.Parts[0][1] = new MapPoint(x3, y3, polyline.SpatialReference); // how to change one specific point in the polyline 
graphic.Geometry = builder.ToGeometry(); // create new polyline from the builder&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:06:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-do-i-update-the-geometry-of-polyline-once-i/m-p/55259#M579</guid>
      <dc:creator>AnttiKajanus1</dc:creator>
      <dc:date>2021-12-10T22:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do i update the geometry of polyline?? once i created it, and add it to the graphics layer.</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-do-i-update-the-geometry-of-polyline-once-i/m-p/55260#M580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, it helped a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Nov 2014 06:25:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-do-i-update-the-geometry-of-polyline-once-i/m-p/55260#M580</guid>
      <dc:creator>ShaharBukra</dc:creator>
      <dc:date>2014-11-27T06:25:44Z</dc:date>
    </item>
  </channel>
</rss>

