<?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: Select Multiple Polygons and then Merging them in New to GIS Questions</title>
    <link>https://community.esri.com/t5/new-to-gis-questions/select-multiple-polygons-and-then-merging-them/m-p/94740#M244</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="highlighted.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/84160_highlighted.png" style="width: 620px; height: 349px;" /&gt;&lt;/P&gt;&lt;P&gt;for example sir. i want to merge those highlighted parcels programmatically. Can you please send me some vba codes?&lt;/P&gt;&lt;P&gt;And before that i use this code to highlight them manually.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIGHLIGHTED CODE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Private Sub UIToolControl1_MouseDown(ByVal button As Long, ByVal shift As Long, ByVal x As Long, ByVal y As Long)&lt;/P&gt;&lt;P&gt; Dim pMxDoc As IMxDocument&lt;/P&gt;&lt;P&gt; Set pMxDoc = ThisDocument&lt;/P&gt;&lt;P&gt; Dim SearchTol As Double&lt;/P&gt;&lt;P&gt; Dim pPoint As IPoint&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set pPoint = pMxDoc.ActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(x, y)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; 'Pass the point to the FindBoundary function along with the Map and search tolerance&lt;/P&gt;&lt;P&gt;&amp;nbsp; SearchTol = pMxDoc.SearchTolerance&lt;/P&gt;&lt;P&gt;&amp;nbsp; FindBoundary SearchTol, pPoint, pMxDoc.FocusMap&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; 'Message box the feature ID and feature class alias name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; 'MsgBox pFeature.OID &amp;amp; " " &amp;amp; pFeature.Class.AliasName&lt;/P&gt;&lt;P&gt; pMxDoc.ActiveView.Refresh&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Private Function FindBoundary(SearchTol As Double, pPoint As IPoint, pMap As IMap)&lt;/P&gt;&lt;P&gt;'** This function is called by the subroutine SelectBoundary_MouseDown&lt;/P&gt;&lt;P&gt;'** this selects the boundary based on the click event of the user&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pFeatSel As IFeatureSelection&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim pEnvelope As IEnvelope&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim pSpatialFilter As ISpatialFilter&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim pEnumLayer As IEnumLayer&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim pFeatureLayer As IFeatureLayer&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim pFeatureClass As IFeatureClass&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim pUID As New uid&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim pFeatureCursor As IFeatureCursor&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim pFeature As IFeature&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim pSelection As IFeatureSelection&lt;/P&gt;&lt;P&gt;&amp;nbsp; If pMap.LayerCount = 0 Then Exit Function&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'Clear any already selected Features&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; pUID = "{40A9E885-5533-11D0-98BE-00805F7CED21}" 'IFeatureLayer&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set pEnumLayer = pMap.Layers(pUID, False)&lt;/P&gt;&lt;P&gt;&amp;nbsp; pEnumLayer.Reset&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set pFeatureLayer = pEnumLayer.Next&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set pFeatureClass = pFeatureLayer.FeatureClass&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'Expand the points envelope to give better search results&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set pEnvelope = pPoint.Envelope&lt;/P&gt;&lt;P&gt;&amp;nbsp; pEnvelope.Expand SearchTol, SearchTol, False&lt;/P&gt;&lt;P&gt;&amp;nbsp; ShapeFieldName = pFeatureLayer.FeatureClass.ShapeFieldName&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'Search each selectable feature layer for a feature&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'Return the first feature found&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set pSpatialFilter = New SpatialFilter&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set pSpatialFilter.Geometry = pEnvelope&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set pSpatialFilter.OutputSpatialReference(ShapeFieldName) = pMap.SpatialReference&lt;/P&gt;&lt;P&gt;&amp;nbsp; pSpatialFilter.GeometryField = pFeatureLayer.FeatureClass.ShapeFieldName&lt;/P&gt;&lt;P&gt;&amp;nbsp; pSpatialFilter.SpatialRel = esriSpatialRelIntersects&lt;/P&gt;&lt;P&gt;&amp;nbsp; If pFeatureLayer.Selectable Then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pSelection = pFeatureLayer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pSelection.SelectFeatures pSpatialFilter, esriSelectionResultAdd, False&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Set pFeatSel = pSelection&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; MsgBox (pFeatSel.SelectionSet.Count &amp;amp; " Features Selected from " &amp;amp; pFeatureLayer.FeatureClass.AliasName)&lt;/P&gt;&lt;P&gt;&amp;nbsp; End If&lt;/P&gt;&lt;P&gt;&amp;nbsp; End Function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Apr 2015 06:10:46 GMT</pubDate>
    <dc:creator>bobbycorpuz</dc:creator>
    <dc:date>2015-04-13T06:10:46Z</dc:date>
    <item>
      <title>Select Multiple Polygons and then Merging them</title>
      <link>https://community.esri.com/t5/new-to-gis-questions/select-multiple-polygons-and-then-merging-them/m-p/94737#M241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day everyone, can somebody help me with my problem? I want to Select Multiple Polygons from the same layer and merging it after the selection (programatically). I am using arcmap 10.1 and vba as my coding environment. Tnx in advance for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 03:34:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/new-to-gis-questions/select-multiple-polygons-and-then-merging-them/m-p/94737#M241</guid>
      <dc:creator>bobbycorpuz</dc:creator>
      <dc:date>2015-04-13T03:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Select Multiple Polygons and then Merging them</title>
      <link>https://community.esri.com/t5/new-to-gis-questions/select-multiple-polygons-and-then-merging-them/m-p/94738#M242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Programmatically...using vba? are you working in Desktop or elsewhere?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 04:55:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/new-to-gis-questions/select-multiple-polygons-and-then-merging-them/m-p/94738#M242</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-04-13T04:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Select Multiple Polygons and then Merging them</title>
      <link>https://community.esri.com/t5/new-to-gis-questions/select-multiple-polygons-and-then-merging-them/m-p/94739#M243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes sir &lt;A href="https://community.esri.com/migrated-users/3116"&gt;Dan Patterson&lt;/A&gt;​... i am working with Desktop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 06:01:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/new-to-gis-questions/select-multiple-polygons-and-then-merging-them/m-p/94739#M243</guid>
      <dc:creator>bobbycorpuz</dc:creator>
      <dc:date>2015-04-13T06:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: Select Multiple Polygons and then Merging them</title>
      <link>https://community.esri.com/t5/new-to-gis-questions/select-multiple-polygons-and-then-merging-them/m-p/94740#M244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="highlighted.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/84160_highlighted.png" style="width: 620px; height: 349px;" /&gt;&lt;/P&gt;&lt;P&gt;for example sir. i want to merge those highlighted parcels programmatically. Can you please send me some vba codes?&lt;/P&gt;&lt;P&gt;And before that i use this code to highlight them manually.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIGHLIGHTED CODE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Private Sub UIToolControl1_MouseDown(ByVal button As Long, ByVal shift As Long, ByVal x As Long, ByVal y As Long)&lt;/P&gt;&lt;P&gt; Dim pMxDoc As IMxDocument&lt;/P&gt;&lt;P&gt; Set pMxDoc = ThisDocument&lt;/P&gt;&lt;P&gt; Dim SearchTol As Double&lt;/P&gt;&lt;P&gt; Dim pPoint As IPoint&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set pPoint = pMxDoc.ActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(x, y)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; 'Pass the point to the FindBoundary function along with the Map and search tolerance&lt;/P&gt;&lt;P&gt;&amp;nbsp; SearchTol = pMxDoc.SearchTolerance&lt;/P&gt;&lt;P&gt;&amp;nbsp; FindBoundary SearchTol, pPoint, pMxDoc.FocusMap&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; 'Message box the feature ID and feature class alias name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; 'MsgBox pFeature.OID &amp;amp; " " &amp;amp; pFeature.Class.AliasName&lt;/P&gt;&lt;P&gt; pMxDoc.ActiveView.Refresh&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Private Function FindBoundary(SearchTol As Double, pPoint As IPoint, pMap As IMap)&lt;/P&gt;&lt;P&gt;'** This function is called by the subroutine SelectBoundary_MouseDown&lt;/P&gt;&lt;P&gt;'** this selects the boundary based on the click event of the user&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pFeatSel As IFeatureSelection&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim pEnvelope As IEnvelope&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim pSpatialFilter As ISpatialFilter&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim pEnumLayer As IEnumLayer&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim pFeatureLayer As IFeatureLayer&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim pFeatureClass As IFeatureClass&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim pUID As New uid&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim pFeatureCursor As IFeatureCursor&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim pFeature As IFeature&lt;/P&gt;&lt;P&gt;&amp;nbsp; Dim pSelection As IFeatureSelection&lt;/P&gt;&lt;P&gt;&amp;nbsp; If pMap.LayerCount = 0 Then Exit Function&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'Clear any already selected Features&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; pUID = "{40A9E885-5533-11D0-98BE-00805F7CED21}" 'IFeatureLayer&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set pEnumLayer = pMap.Layers(pUID, False)&lt;/P&gt;&lt;P&gt;&amp;nbsp; pEnumLayer.Reset&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set pFeatureLayer = pEnumLayer.Next&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set pFeatureClass = pFeatureLayer.FeatureClass&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'Expand the points envelope to give better search results&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set pEnvelope = pPoint.Envelope&lt;/P&gt;&lt;P&gt;&amp;nbsp; pEnvelope.Expand SearchTol, SearchTol, False&lt;/P&gt;&lt;P&gt;&amp;nbsp; ShapeFieldName = pFeatureLayer.FeatureClass.ShapeFieldName&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'Search each selectable feature layer for a feature&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'Return the first feature found&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set pSpatialFilter = New SpatialFilter&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set pSpatialFilter.Geometry = pEnvelope&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set pSpatialFilter.OutputSpatialReference(ShapeFieldName) = pMap.SpatialReference&lt;/P&gt;&lt;P&gt;&amp;nbsp; pSpatialFilter.GeometryField = pFeatureLayer.FeatureClass.ShapeFieldName&lt;/P&gt;&lt;P&gt;&amp;nbsp; pSpatialFilter.SpatialRel = esriSpatialRelIntersects&lt;/P&gt;&lt;P&gt;&amp;nbsp; If pFeatureLayer.Selectable Then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pSelection = pFeatureLayer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pSelection.SelectFeatures pSpatialFilter, esriSelectionResultAdd, False&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Set pFeatSel = pSelection&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; MsgBox (pFeatSel.SelectionSet.Count &amp;amp; " Features Selected from " &amp;amp; pFeatureLayer.FeatureClass.AliasName)&lt;/P&gt;&lt;P&gt;&amp;nbsp; End If&lt;/P&gt;&lt;P&gt;&amp;nbsp; End Function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 06:10:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/new-to-gis-questions/select-multiple-polygons-and-then-merging-them/m-p/94740#M244</guid>
      <dc:creator>bobbycorpuz</dc:creator>
      <dc:date>2015-04-13T06:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: Select Multiple Polygons and then Merging them</title>
      <link>https://community.esri.com/t5/new-to-gis-questions/select-multiple-polygons-and-then-merging-them/m-p/94741#M245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CAN ANYBODY KNOWS HOW TO DO IT? TNX IN ADVANCE... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2015 08:22:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/new-to-gis-questions/select-multiple-polygons-and-then-merging-them/m-p/94741#M245</guid>
      <dc:creator>bobbycorpuz</dc:creator>
      <dc:date>2015-04-13T08:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: Select Multiple Polygons and then Merging them</title>
      <link>https://community.esri.com/t5/new-to-gis-questions/select-multiple-polygons-and-then-merging-them/m-p/94742#M246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bobby,&lt;/P&gt;&lt;P&gt;Have you thought about trying the coding using ArcPy and Python?&amp;nbsp; I know it's sometimes easier to stick to a language that you know (and I'm not saying you have to switch, but recommended since VBA is being phased out with ArcMap), but Python actually is fairly easy to learn and the language of choice now, and you may get more responses if you want help with Python.&amp;nbsp; One other suggestion (so your question will get looks at by a larger group of developers) is to edit your original question and move it to the &lt;A href="https://community.esri.com/space/2030"&gt;Developers&lt;/A&gt;​ group. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need some suggestions for how to get started in Python, check out this group&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/space/2145"&gt;Python&lt;/A&gt; &lt;/P&gt;&lt;P&gt;and &lt;A href="http://desktop.arcgis.com/en/analytics/python/" title="http://desktop.arcgis.com/en/analytics/python/"&gt;Python for ArcGIS | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry I can't be of more help, but I'm very rusty on VBA....although in a few months I'll dig into it again as I try to update some of my older apps. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are just suggestions to get your question looked at by a larger, more developer oriented audience.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 19:28:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/new-to-gis-questions/select-multiple-polygons-and-then-merging-them/m-p/94742#M246</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2015-04-14T19:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Select Multiple Polygons and then Merging them</title>
      <link>https://community.esri.com/t5/new-to-gis-questions/select-multiple-polygons-and-then-merging-them/m-p/94743#M247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your comment and recommendation Madam &lt;A href="https://community.esri.com/migrated-users/2691"&gt;Rebecca Strauch&lt;/A&gt;​​​, I just need to finish the project that i am working on. Maybe i'll try working on arcPy and Python sooner. As for now, I will just stick to this rusty vba until this project is done. GODSPEED!&amp;nbsp; &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2015 06:39:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/new-to-gis-questions/select-multiple-polygons-and-then-merging-them/m-p/94743#M247</guid>
      <dc:creator>bobbycorpuz</dc:creator>
      <dc:date>2015-04-15T06:39:51Z</dc:date>
    </item>
  </channel>
</rss>

