<?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: ArcObjects SDK: How to disable auto-commit mode in non-versioned editing in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-sdk-how-to-disable-auto-commit-mode-in/m-p/475863#M12901</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There only workarounds to handle this bug I can imaging are both about automating GUI by doing the clicks for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone who is familar with AutoHotKey (&lt;CITE class="_Rm"&gt;&lt;A href="http://www.autohotkey.com/"&gt;http://www.autohotkey.com)&lt;/A&gt;&lt;/CITE&gt; could try to get a macro going. Let it open the edit options dialog, selecting versioning tab on its propertysheet and unchecking the two Checkboxes for multiversioning and auto-commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With a few nasty hacks it's possible to get another temporary workaound by code. The workaround is about automating GUI by using WinAPI aswell:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Ensure "Versioning" tab is focussed in edit options propertysheet when opening edit options dialog: a registry key will do that for you (HKEY_CURRENT_USER\Software\ESRI\Desktop10.2\ArcMap\PropertySheets\EditOptions. Set default key to value=2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Start a new thread perfoming all following steps from step 4 to 5 (because edit options dialog is modal). Thread must begin with a short sleep (about 500ms) to ensure, that edit options dialog is opened when starting GUI automation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Execute Command to open edit options dialog: UID "esriEditor.PropertiesCommand" in the main thread. Dialog will appear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Use WinAPI to get handles to the two checkboxes and to the OK button. A good example about how to query handles see &lt;A href="http://kellyschronicles.wordpress.com/2008/06/23/get-window-handles-associated-with-process-in-vb-net/"&gt;here&lt;/A&gt;. As mentioned in step 2 this must be done outside the main thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. Performing clicks by sending windows messages WM_LBUTTONDOWN + WM_LBUTTONUP to mutliversioning checkbox, then to auto-commit checkbox and at least to OK-Button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This workaound ist not very safe and it isn't suitable for production environments. But for development and testing purposes it works for me and saves a lot of time during development.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps someone.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Sep 2014 08:17:36 GMT</pubDate>
    <dc:creator>FabianFusholler</dc:creator>
    <dc:date>2014-09-19T08:17:36Z</dc:date>
    <item>
      <title>ArcObjects SDK: How to disable auto-commit mode in non-versioned editing</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-sdk-how-to-disable-auto-commit-mode-in/m-p/475861#M12899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;does anyone know how to disable auto-commit mode in non-versioned editing environment with ArcObjects?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At 10.2.1 there is a new setting available in edit options "Automatically save changes after each edit". Per default this option is activated. So any change during an edit session is committed immediately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See &lt;A href="http://resources.arcgis.com/en/help/main/10.2/003n/003n000000s8000000.htm" title="http://resources.arcgis.com/en/help/main/10.2/003n/003n000000s8000000.htm"&gt;ArcGIS Help 10.2 - Configuring an ArcMap edit session to perform nonversioned edits&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A bug related to this option is reported, see &lt;A href="http://support.esri.com/en/bugs/nimbus/TklNMDk4OTkx" title="http://support.esri.com/en/bugs/nimbus/TklNMDk4OTkx"&gt;NIM098991 - The option to 'Automatically save changes after ea..&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did neither find any interface or property in ArcObjects SDK nor any registry key to set this option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions or experiences?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 14:26:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-sdk-how-to-disable-auto-commit-mode-in/m-p/475861#M12899</guid>
      <dc:creator>FabianFusholler</dc:creator>
      <dc:date>2014-07-30T14:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: ArcObjects SDK: How to disable auto-commit mode in non-versioned editing</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-sdk-how-to-disable-auto-commit-mode-in/m-p/475862#M12900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial','sans-serif';"&gt;Meanwhile i've got a response from ESRI:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial','sans-serif';"&gt;As this functionality is newly introduced in ArcGIS 10.2.1, it hasn't been exposed to ArcObjects for development yet, and there is no individual interface/method to deal with this function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Arial','sans-serif';"&gt;Nevertheless, as this bug has already &lt;SPAN style="font-size: 11.0pt; font-family: 'Arial','sans-serif';"&gt;been&amp;nbsp; &lt;/SPAN&gt;fixed in ArcGIS 10.3, my hope is that there will be some interface to deal with.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Aug 2014 07:22:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-sdk-how-to-disable-auto-commit-mode-in/m-p/475862#M12900</guid>
      <dc:creator>FabianFusholler</dc:creator>
      <dc:date>2014-08-15T07:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: ArcObjects SDK: How to disable auto-commit mode in non-versioned editing</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-sdk-how-to-disable-auto-commit-mode-in/m-p/475863#M12901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There only workarounds to handle this bug I can imaging are both about automating GUI by doing the clicks for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone who is familar with AutoHotKey (&lt;CITE class="_Rm"&gt;&lt;A href="http://www.autohotkey.com/"&gt;http://www.autohotkey.com)&lt;/A&gt;&lt;/CITE&gt; could try to get a macro going. Let it open the edit options dialog, selecting versioning tab on its propertysheet and unchecking the two Checkboxes for multiversioning and auto-commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With a few nasty hacks it's possible to get another temporary workaound by code. The workaround is about automating GUI by using WinAPI aswell:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Ensure "Versioning" tab is focussed in edit options propertysheet when opening edit options dialog: a registry key will do that for you (HKEY_CURRENT_USER\Software\ESRI\Desktop10.2\ArcMap\PropertySheets\EditOptions. Set default key to value=2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Start a new thread perfoming all following steps from step 4 to 5 (because edit options dialog is modal). Thread must begin with a short sleep (about 500ms) to ensure, that edit options dialog is opened when starting GUI automation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Execute Command to open edit options dialog: UID "esriEditor.PropertiesCommand" in the main thread. Dialog will appear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Use WinAPI to get handles to the two checkboxes and to the OK button. A good example about how to query handles see &lt;A href="http://kellyschronicles.wordpress.com/2008/06/23/get-window-handles-associated-with-process-in-vb-net/"&gt;here&lt;/A&gt;. As mentioned in step 2 this must be done outside the main thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. Performing clicks by sending windows messages WM_LBUTTONDOWN + WM_LBUTTONUP to mutliversioning checkbox, then to auto-commit checkbox and at least to OK-Button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This workaound ist not very safe and it isn't suitable for production environments. But for development and testing purposes it works for me and saves a lot of time during development.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps someone.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Sep 2014 08:17:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-sdk-how-to-disable-auto-commit-mode-in/m-p/475863#M12901</guid>
      <dc:creator>FabianFusholler</dc:creator>
      <dc:date>2014-09-19T08:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: ArcObjects SDK: How to disable auto-commit mode in non-versioned editing</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-sdk-how-to-disable-auto-commit-mode-in/m-p/475864#M12902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am with you on this, also waiting anxiously for the fix related to the bug and the hooks in the API.&amp;nbsp; This bug causes data to be to corrupted and is an inconvenience so I hope ESRI has put a high priority on it...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2014 15:01:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-sdk-how-to-disable-auto-commit-mode-in/m-p/475864#M12902</guid>
      <dc:creator>AlpineTech</dc:creator>
      <dc:date>2014-12-05T15:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: ArcObjects SDK: How to disable auto-commit mode in non-versioned editing</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-sdk-how-to-disable-auto-commit-mode-in/m-p/475865#M12903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also hope that an interface will be provided soon. I did not find anything in ArcGIS 10.3 though. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Meanwhile i created a workaround by saving, editing and reloading the editor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void EnsureNonAutoCommit(IEditor editor)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string tempName = Path.Combine(Path.GetTempPath(), "mistraEditor.tmp");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IBlobStream blobStream = new MemoryBlobStreamClass();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IStream stream = blobStream;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((IPersistStream)editor).Save(stream, 1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; blobStream.SaveToFile(tempName);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; using (BinaryWriter w = new BinaryWriter(new System.IO.FileStream(tempName, FileMode.Open)))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; w.Seek((int)w.BaseStream.Length - 2, SeekOrigin.Begin);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // for AutoCommit, the last two bytes are 255 &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; w.Write(new byte[] { 0, 0 });&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileStreamClass cStr = new FileStreamClass();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IFile fi = cStr;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fi.Open(tempName, esriFilePermission.esriReadOnly);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IStream str = cStr;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((IPersistStream)editor).Load(str);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 11:25:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-sdk-how-to-disable-auto-commit-mode-in/m-p/475865#M12903</guid>
      <dc:creator>FelixArnet1</dc:creator>
      <dc:date>2015-04-07T11:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: ArcObjects SDK: How to disable auto-commit mode in non-versioned editing</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-sdk-how-to-disable-auto-commit-mode-in/m-p/475866#M12904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This property is now exposed in the 10.4 SDK as IEditProperties5.AutoSaveNonVersionedEdit. Its a Boolean with get/set access.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jan 2016 18:10:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-sdk-how-to-disable-auto-commit-mode-in/m-p/475866#M12904</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2016-01-04T18:10:36Z</dc:date>
    </item>
  </channel>
</rss>

