<?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 Edit Operation Error Using Clip in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/edit-operation-error-using-clip/m-p/1146343#M7816</link>
    <description>&lt;P&gt;I tried to use the inspector and edit operation to clip selected feature from a feature class, but I am getting an error at SelectedLayer. I am also not sure how I should address oid. Is this the oid of the new clipped feature class?&amp;nbsp; Please see my code below. Thanks for your help!&lt;/P&gt;&lt;P&gt;public async Task SelectionLayer_Inspector()&lt;BR /&gt;{&lt;BR /&gt;await QueuedTask.Run(() =&amp;gt;&lt;BR /&gt;{&lt;BR /&gt;var MV = MapView.Active;&lt;BR /&gt;var MU_Layer = MV.Map.GetLayersAsFlattenedList().OfType&amp;lt;FeatureLayer&amp;gt;().Where(fl =&amp;gt; fl.Name.Contains("MUPOLYGON")).FirstOrDefault();&lt;BR /&gt;var SelectedLayer = MV.Map.GetSelection();&lt;BR /&gt;var oid = new List&amp;lt;long&amp;gt;();&lt;/P&gt;&lt;P&gt;var inspector = new Inspector();&lt;BR /&gt;inspector.LoadAsync(SelectedLayer.Keys.First(), SelectedLayer.Values.First());&lt;BR /&gt;var Mukeys = inspector["mukey"];&lt;BR /&gt;return Mukeys;&lt;/P&gt;&lt;P&gt;var clipOp = new EditOperation();&lt;BR /&gt;clipOp.Name = "clip the selected layer";&lt;BR /&gt;clipOp.Clip(MU_Layer, oid, SelectedLayer, ClipMode.PreserveArea);&lt;BR /&gt;clipOp.ExecuteAsync();&lt;/P&gt;&lt;P&gt;});&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Tue, 22 Feb 2022 04:39:22 GMT</pubDate>
    <dc:creator>ThiPham12</dc:creator>
    <dc:date>2022-02-22T04:39:22Z</dc:date>
    <item>
      <title>Edit Operation Error Using Clip</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/edit-operation-error-using-clip/m-p/1146343#M7816</link>
      <description>&lt;P&gt;I tried to use the inspector and edit operation to clip selected feature from a feature class, but I am getting an error at SelectedLayer. I am also not sure how I should address oid. Is this the oid of the new clipped feature class?&amp;nbsp; Please see my code below. Thanks for your help!&lt;/P&gt;&lt;P&gt;public async Task SelectionLayer_Inspector()&lt;BR /&gt;{&lt;BR /&gt;await QueuedTask.Run(() =&amp;gt;&lt;BR /&gt;{&lt;BR /&gt;var MV = MapView.Active;&lt;BR /&gt;var MU_Layer = MV.Map.GetLayersAsFlattenedList().OfType&amp;lt;FeatureLayer&amp;gt;().Where(fl =&amp;gt; fl.Name.Contains("MUPOLYGON")).FirstOrDefault();&lt;BR /&gt;var SelectedLayer = MV.Map.GetSelection();&lt;BR /&gt;var oid = new List&amp;lt;long&amp;gt;();&lt;/P&gt;&lt;P&gt;var inspector = new Inspector();&lt;BR /&gt;inspector.LoadAsync(SelectedLayer.Keys.First(), SelectedLayer.Values.First());&lt;BR /&gt;var Mukeys = inspector["mukey"];&lt;BR /&gt;return Mukeys;&lt;/P&gt;&lt;P&gt;var clipOp = new EditOperation();&lt;BR /&gt;clipOp.Name = "clip the selected layer";&lt;BR /&gt;clipOp.Clip(MU_Layer, oid, SelectedLayer, ClipMode.PreserveArea);&lt;BR /&gt;clipOp.ExecuteAsync();&lt;/P&gt;&lt;P&gt;});&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 04:39:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/edit-operation-error-using-clip/m-p/1146343#M7816</guid>
      <dc:creator>ThiPham12</dc:creator>
      <dc:date>2022-02-22T04:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: Edit Operation Error Using Clip</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/edit-operation-error-using-clip/m-p/1146357#M7820</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;At first "return Mukeys;" breaks code execution at this point and your clip operation will not be executed.&lt;/P&gt;&lt;P&gt;More information about EditOperation Clip method here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/2.7/sdk/api-reference/#topic9498.html" target="_self"&gt;https://pro.arcgis.com/en/pro-app/2.7/sdk/api-reference/#topic9498.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From your question difficult to understand that task do you want to realize. Do you want to clip single feature or selected features? What is your clipping geometry and etc.&lt;/P&gt;&lt;P&gt;From your&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 06:28:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/edit-operation-error-using-clip/m-p/1146357#M7820</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2022-02-22T06:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Edit Operation Error Using Clip</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/edit-operation-error-using-clip/m-p/1146558#M7823</link>
      <description>&lt;P&gt;I want to clip the selected feature from MUPOLYGON. I basically want to extract the selected input feature, SelectionLayer that overlay the clip feature, MUPOLYGON. Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 16:51:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/edit-operation-error-using-clip/m-p/1146558#M7823</guid>
      <dc:creator>ThiPham12</dc:creator>
      <dc:date>2022-02-22T16:51:48Z</dc:date>
    </item>
  </channel>
</rss>

