<?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: Split with Update in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/split-with-update/m-p/1391045#M20648</link>
    <description>&lt;P&gt;Here is my code&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/493609"&gt;@sonj&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;We are upgrading the VBA tool to 10.6 version. The objective is to cut the polygon using IFeatureEdit2.SplitWithUpdate. After running the tool the split polygon disappears.&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;IEditor m_editor;&lt;/DIV&gt;&lt;DIV&gt;ESRI.ArcGIS.esriSystem.UID editorUid = new ESRI.ArcGIS.esriSystem.UID();&lt;/DIV&gt;&lt;DIV&gt;editorUid.Value = "esriEditor.Editor";&lt;/DIV&gt;&lt;DIV&gt;m_editor = ArcMap.Application.FindExtensionByCLSID(editorUid) as ESRI.ArcGIS.Editor.IEditor;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Application.DoEvents();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;IFeatureEdit2 featureEdit = PolygonFeature as IFeatureEdit2;&lt;/DIV&gt;&lt;DIV&gt;ISet newFeaturesSet = featureEdit.SplitWithUpdate(NewPolyline);&lt;/DIV&gt;&lt;DIV&gt;newFeaturesSet.Reset();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;IFeature newFeature = null;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;while ((newFeature = newFeaturesSet.Next() as IFeature) != null)&lt;/DIV&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IInvalidArea invalidArea;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;invalidArea = new InvalidArea();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;invalidArea.Display = m_editor.Display;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;invalidArea.Add(newFeature);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;invalidArea.Invalidate(-2);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;newFeature.Store();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;WriteReport(string.Format("Line ID {0}, Original Polygon ID {1}, New Polygon ID {2}", LineFeature.OID, PolygonFeature.OID, newFeature.OID));&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ArcMap.Document.ActiveView.ScreenDisplay.Invalidate(null, false, (short)esriScreenCache.esriAllScreenCaches);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ArcMap.Document.ActiveView.ScreenDisplay.UpdateWindow();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;</description>
    <pubDate>Tue, 05 Mar 2024 12:43:03 GMT</pubDate>
    <dc:creator>sonj</dc:creator>
    <dc:date>2024-03-05T12:43:03Z</dc:date>
    <item>
      <title>Split with Update</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/split-with-update/m-p/1389368#M20646</link>
      <description>&lt;P&gt;We are upgrading the VBA tool to 10.6 version. The objective is to cut the polygon using IFeatureEdit2.SplitWithUpdate. After running the tool the split polygon disappears.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2024 09:58:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/split-with-update/m-p/1389368#M20646</guid>
      <dc:creator>sonj</dc:creator>
      <dc:date>2024-03-01T09:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: Split with Update</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/split-with-update/m-p/1390477#M20647</link>
      <description>&lt;P&gt;For the best reponses you should post your code and explain what debugging you have tried so far.&amp;nbsp; If this is an ESRI tool that is not working, you have posted in the wrong community.&lt;/P&gt;&lt;P&gt;Brent Hoskisson&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 16:27:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/split-with-update/m-p/1390477#M20647</guid>
      <dc:creator>BrentHoskisson</dc:creator>
      <dc:date>2024-03-04T16:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Split with Update</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/split-with-update/m-p/1391045#M20648</link>
      <description>&lt;P&gt;Here is my code&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/493609"&gt;@sonj&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;We are upgrading the VBA tool to 10.6 version. The objective is to cut the polygon using IFeatureEdit2.SplitWithUpdate. After running the tool the split polygon disappears.&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;IEditor m_editor;&lt;/DIV&gt;&lt;DIV&gt;ESRI.ArcGIS.esriSystem.UID editorUid = new ESRI.ArcGIS.esriSystem.UID();&lt;/DIV&gt;&lt;DIV&gt;editorUid.Value = "esriEditor.Editor";&lt;/DIV&gt;&lt;DIV&gt;m_editor = ArcMap.Application.FindExtensionByCLSID(editorUid) as ESRI.ArcGIS.Editor.IEditor;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Application.DoEvents();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;IFeatureEdit2 featureEdit = PolygonFeature as IFeatureEdit2;&lt;/DIV&gt;&lt;DIV&gt;ISet newFeaturesSet = featureEdit.SplitWithUpdate(NewPolyline);&lt;/DIV&gt;&lt;DIV&gt;newFeaturesSet.Reset();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;IFeature newFeature = null;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;while ((newFeature = newFeaturesSet.Next() as IFeature) != null)&lt;/DIV&gt;&lt;DIV&gt;{&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IInvalidArea invalidArea;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;invalidArea = new InvalidArea();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;invalidArea.Display = m_editor.Display;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;invalidArea.Add(newFeature);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;invalidArea.Invalidate(-2);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;newFeature.Store();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;WriteReport(string.Format("Line ID {0}, Original Polygon ID {1}, New Polygon ID {2}", LineFeature.OID, PolygonFeature.OID, newFeature.OID));&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ArcMap.Document.ActiveView.ScreenDisplay.Invalidate(null, false, (short)esriScreenCache.esriAllScreenCaches);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ArcMap.Document.ActiveView.ScreenDisplay.UpdateWindow();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;</description>
      <pubDate>Tue, 05 Mar 2024 12:43:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/split-with-update/m-p/1391045#M20648</guid>
      <dc:creator>sonj</dc:creator>
      <dc:date>2024-03-05T12:43:03Z</dc:date>
    </item>
  </channel>
</rss>

