<?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: form ShowDialog in an editevent in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/form-showdialog-in-an-editevent/m-p/1529#M42</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That makes sense.&amp;nbsp; I would, however, like to make this as simple as possible for the user.&amp;nbsp; Seem like there should be a way to "disable" ArcMap while a non-modal form is open?&amp;nbsp; I would like to cut down the number of times the user needs to click a button.&amp;nbsp; Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Dec 2012 21:57:59 GMT</pubDate>
    <dc:creator>JesseAdams</dc:creator>
    <dc:date>2012-12-19T21:57:59Z</dc:date>
    <item>
      <title>form ShowDialog in an editevent</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/form-showdialog-in-an-editevent/m-p/1527#M40</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here in my workflow:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Click a button on a toolbar - edit session starts&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Listen for the OnSketchFinished event of the editor&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Display a data entry dialog for the user to fill in&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4. Click the OK button on the dialog to close the form and save edits&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem I'm running into is I'm unable to use Form.ShowDialog in the OnSketchFinished event and execute stop editing because I'm still inside of the OnSketchFinished event.&amp;nbsp; It works as expected if I use a non-modal form (Form.Show()) however, ArcMap is still usable, which I don't want.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions on how to open a required dialog from the OnSketchFinished event and stop editing when the dialog closes?&amp;nbsp; Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 19:40:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/form-showdialog-in-an-editevent/m-p/1527#M40</guid>
      <dc:creator>JesseAdams</dc:creator>
      <dc:date>2012-12-19T19:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: form ShowDialog in an editevent</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/form-showdialog-in-an-editevent/m-p/1528#M41</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm pretty sure you can't stop the edit session from within an editor event like this.&amp;nbsp; A typical workflow would be for the user to start the edit session, sketch a new feature, you listen for the OnCreateFeature event and pop up your dialog which would in turn populate attributes on the new feature and close.&amp;nbsp; The user would then continue their edit session.&amp;nbsp; If they save, then your attribute edits would be saved along with the new feature.&amp;nbsp; If they cancel, then your attribute edits are discarded.&amp;nbsp; They could also continue creating more features and your dialog would pop up for each.&amp;nbsp; If want a different workflow, then you may find it easier to skip using the editor altogether and simply write a tool that does what you need it to do.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 20:38:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/form-showdialog-in-an-editevent/m-p/1528#M41</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2012-12-19T20:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: form ShowDialog in an editevent</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/form-showdialog-in-an-editevent/m-p/1529#M42</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That makes sense.&amp;nbsp; I would, however, like to make this as simple as possible for the user.&amp;nbsp; Seem like there should be a way to "disable" ArcMap while a non-modal form is open?&amp;nbsp; I would like to cut down the number of times the user needs to click a button.&amp;nbsp; Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 21:57:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/form-showdialog-in-an-editevent/m-p/1529#M42</guid>
      <dc:creator>JesseAdams</dc:creator>
      <dc:date>2012-12-19T21:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: form ShowDialog in an editevent</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/form-showdialog-in-an-editevent/m-p/1530#M43</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;One of my applications uses a modal form for the user to populate the attributes of the feature. I do this in the OnCreateFeature event. However, the OnCreateFeature doesn't get fired when using the Auto-Complete Polygon tool, so in the OnSketchFinished event, I check whether the user is using that tool and use a modal dialog there, also&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; Private Sub OnSketchFinished()
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim AttribSelForm As New AttributeSelectionForm
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pEditTask As ESRI.ArcGIS.Editor.IEditTask
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pEditTaskSearch As ESRI.ArcGIS.Editor.IEditTaskSearch = My.ArcMap.Editor

&amp;nbsp;&amp;nbsp;&amp;nbsp; pEditTask = pEditTaskSearch.TaskByUniqueName("TitusUI_AutoCompletePolygonTask")
&amp;nbsp;&amp;nbsp;&amp;nbsp; If My.ArcMap.Editor.CurrentTask Is pEditTask Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AttribSelForm.ShowDialog(System.Windows.Forms.Control.FromHandle(My.ArcMap.Application.hWnd))
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:04:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/form-showdialog-in-an-editevent/m-p/1530#M43</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-12-10T20:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: form ShowDialog in an editevent</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/form-showdialog-in-an-editevent/m-p/1531#M44</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What about this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the What's new section for ArcObjects 10.1 docs:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;&lt;STRONG&gt;geodatabase&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The following enhancements have been made to the com.esri.arcgis.geodatabase package:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;The workspace editing event model has been extended&amp;nbsp; to include the IWorkspaceEditEvents2 interface. This interface exposes&amp;nbsp; an event method, onBeginStopEditing(), that is &lt;STRONG&gt;triggered when client&amp;nbsp; code calls the stopEditing() method on the IWorkspaceEdit interface and&amp;nbsp; allows custom behavior to occur before the edit session has stopped&lt;/STRONG&gt;.&amp;nbsp; This is in contrast to the onStopEditing() method on the&amp;nbsp; IWorkspaceEditEvents interface that is triggered after the edit session&amp;nbsp; has already been stopped.&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Dec 2012 12:58:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/form-showdialog-in-an-editevent/m-p/1531#M44</guid>
      <dc:creator>LeoDonahue</dc:creator>
      <dc:date>2012-12-20T12:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: form ShowDialog in an editevent</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/form-showdialog-in-an-editevent/m-p/1532#M45</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the suggestion.&amp;nbsp; Unfortunately I would still need to call StopEditing in the OnSketchComplete event.&amp;nbsp; Looks like the only way is through a custom tool or non-modal form.&amp;nbsp; Strange how this workflow doesn't have an issue on polygon feature classes but does on point feature classes?&amp;nbsp; Very inconsistent.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2012 20:46:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/form-showdialog-in-an-editevent/m-p/1532#M45</guid>
      <dc:creator>JesseAdams</dc:creator>
      <dc:date>2012-12-26T20:46:54Z</dc:date>
    </item>
  </channel>
</rss>

