<?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: Edit operation on ArcGIS Pro SDK in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/edit-operation-on-arcgis-pro-sdk/m-p/1100481#M7163</link>
    <description>&lt;P&gt;Can you clarify your workflow?&amp;nbsp; In your pseudo code you take the digitized geometry and select all features intersected by that polygon, then you clip using the the same digitized geometry.&lt;/P&gt;&lt;P&gt;So you start with this (i am using US Counties here):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Wolf_0-1632248247534.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/23545i035429926161EAEA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Wolf_0-1632248247534.png" alt="Wolf_0-1632248247534.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;then you end up with this study area:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Wolf_1-1632248306931.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/23546i26558C705B29A7B1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Wolf_1-1632248306931.png" alt="Wolf_1-1632248306931.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is this your intended workflow?&lt;/P&gt;</description>
    <pubDate>Tue, 21 Sep 2021 18:16:36 GMT</pubDate>
    <dc:creator>Wolf</dc:creator>
    <dc:date>2021-09-21T18:16:36Z</dc:date>
    <item>
      <title>Edit operation on ArcGIS Pro SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/edit-operation-on-arcgis-pro-sdk/m-p/1098764#M7135</link>
      <description>&lt;P&gt;I am trying to create a simple Add-In tool that will allow users to select features from a feature layer, clip the selected features and merge them together. For example, if there is a shapefile of all the counties in California and the user wants to clip and merge their study area from this county shapefile by selecting two counties as their study area. I am relatively new to ArcGIS Pro SDK and add-in. I am not sure if I am declaring the intermediate, clipped feature layer, clipArea and new, merged feature layer, new_fc correctly. Just curious, when would you use "//await mergeFeatures.ExecuteAsync()"? The indentation is not correctly shown below. Thanks for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;namespace ArcGISPro_Mapping_Apps&lt;BR /&gt;{&lt;BR /&gt;internal class SelectFeature : MapTool&lt;BR /&gt;{&lt;BR /&gt;public SelectFeature()&lt;BR /&gt;{&lt;BR /&gt;IsSketchTool = true;&lt;BR /&gt;SketchType = SketchGeometryType.Polygon;&lt;BR /&gt;SketchOutputMode = SketchOutputMode.Screen;&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;protected override Task OnToolActivateAsync(bool active)&lt;BR /&gt;{&lt;BR /&gt;return base.OnToolActivateAsync(active);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;protected override Task&amp;lt;bool&amp;gt; OnSketchCompleteAsync(Geometry geometry)&lt;BR /&gt;{&lt;BR /&gt;QueuedTask.Run(() =&amp;gt; {&lt;BR /&gt;var selection = MapView.Active.SelectFeatures(geometry);&lt;BR /&gt;var editOp = new EditOperation();&lt;BR /&gt;var clipArea = MapView.Active.Map.GetLayerAsFlattenedList().First(1 =&amp;gt; 1.Name == "Area_clip");&lt;BR /&gt;var new_fc = MapView.Active.Map.GetLayerAsFlattenedList().First(1 =&amp;gt; 1.Name == "StudyArea_merge");&lt;BR /&gt;var oid = -1;&lt;/P&gt;&lt;P&gt;Geometry clippedGeometry = GeometryEngine.Instance.Clip(geometry, clippedDistance);&lt;BR /&gt;editOp.Name = "clip and merge features";&lt;BR /&gt;editOp.Clip(selection, oid, clipArea, ClipMode.PreserveArea);&lt;BR /&gt;editOp.Merge(clipArea, new_fc, new List&amp;lt;long&amp;gt;() { 10, 96, 12 });&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;// Execute the edit operation&lt;BR /&gt;editOp.ExecuteAsync();&lt;BR /&gt;//await mergeFeatures.ExecuteAsync();&lt;BR /&gt;MessageBox.Show("Study area has been clipped successfully.");&lt;BR /&gt;return true;&lt;BR /&gt;&lt;BR /&gt;});&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 16 Sep 2021 00:22:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/edit-operation-on-arcgis-pro-sdk/m-p/1098764#M7135</guid>
      <dc:creator>ThiPham12</dc:creator>
      <dc:date>2021-09-16T00:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Edit operation on ArcGIS Pro SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/edit-operation-on-arcgis-pro-sdk/m-p/1100481#M7163</link>
      <description>&lt;P&gt;Can you clarify your workflow?&amp;nbsp; In your pseudo code you take the digitized geometry and select all features intersected by that polygon, then you clip using the the same digitized geometry.&lt;/P&gt;&lt;P&gt;So you start with this (i am using US Counties here):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Wolf_0-1632248247534.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/23545i035429926161EAEA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Wolf_0-1632248247534.png" alt="Wolf_0-1632248247534.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;then you end up with this study area:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Wolf_1-1632248306931.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/23546i26558C705B29A7B1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Wolf_1-1632248306931.png" alt="Wolf_1-1632248306931.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is this your intended workflow?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Sep 2021 18:16:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/edit-operation-on-arcgis-pro-sdk/m-p/1100481#M7163</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2021-09-21T18:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: Edit operation on ArcGIS Pro SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/edit-operation-on-arcgis-pro-sdk/m-p/1100866#M7166</link>
      <description>&lt;P&gt;Hi Wolf,&amp;nbsp;&lt;/P&gt;&lt;P&gt;The user will be selecting the counties, which are part of their study area or importing their study area boundary (shp) onto the map. I would like to clip and merge the selected counties or clip the boundary area as you have shown, if they decide to import their boundary area instead.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2021 15:43:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/edit-operation-on-arcgis-pro-sdk/m-p/1100866#M7166</guid>
      <dc:creator>ThiPham12</dc:creator>
      <dc:date>2021-09-22T15:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: Edit operation on ArcGIS Pro SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/edit-operation-on-arcgis-pro-sdk/m-p/1116951#M7352</link>
      <description>&lt;P&gt;Hi Wolf, I figured out how to select the area that overlap using two overlapping shapefiles and selecting the overlapping areas on one of the shapefile. I am figuring out how to do the same process, but using the ICommand select tool (reusing ArcGIS Pro's select tool) and clipping the shapefile I selected. Here is my ICommand script:&amp;nbsp;&lt;/P&gt;&lt;P&gt;public ICommand CmdSelect =&amp;gt;&lt;BR /&gt;FrameworkApplication.GetPlugInWrapper("esri_mapping_selectByRectangleTool") as ICommand;&lt;/P&gt;&lt;P&gt;Here is the tool that I created previously applied to a Pro button, which I would like to recreate the functionality using the ICommand select tool:&amp;nbsp;&lt;/P&gt;&lt;P&gt;await QueuedTask.Run(() =&amp;gt;&lt;BR /&gt;{&lt;BR /&gt;var featureLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType&amp;lt;FeatureLayer&amp;gt;().Where(fl =&amp;gt; fl.Name.Contains("MUPOLYGON")).FirstOrDefault();&lt;/P&gt;&lt;P&gt;QueryFilter queryFilter = new QueryFilter&lt;BR /&gt;{&lt;BR /&gt;WhereClause = "AREASYMBOL = 'CA011' OR AREASYMBOL = 'CA101'",&lt;BR /&gt;SubFields = "MUKEY"&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;featureLayer.Select(queryFilter);&lt;/P&gt;&lt;P&gt;if (featureLayer == null)&lt;BR /&gt;{&lt;BR /&gt;MessageBox.Show("Failed to select.");&lt;BR /&gt;return;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;});&lt;BR /&gt;&lt;BR /&gt;await MapView.Active.ZoomToSelectedAsync(new TimeSpan(0, 0, 3), true);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks Wolf for your help!&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2021 17:06:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/edit-operation-on-arcgis-pro-sdk/m-p/1116951#M7352</guid>
      <dc:creator>ThiPham12</dc:creator>
      <dc:date>2021-11-15T17:06:06Z</dc:date>
    </item>
  </channel>
</rss>

