<?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: How do I register that event handler has finished? in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/how-do-i-register-that-event-handler-has-finished/m-p/5700918#M71793</link>
    <description>my pleasure &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
    <pubDate>Wed, 01 Jul 2015 01:53:56 GMT</pubDate>
    <dc:creator>Aaron.Lu</dc:creator>
    <dc:date>2015-07-01T01:53:56Z</dc:date>
    <item>
      <title>How do I register that event handler has finished?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-do-i-register-that-event-handler-has-finished/m-p/5693074#M71787</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am closing and reopening an active document from the api and in order to this I need to.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Step 1.Open a placeholder document and close my main document.&lt;/P&gt;&lt;P&gt;Step 2.Do this again only opening the original document and closing the place holder.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This requires me to register that the document has closed. unfortunately in i can't do step 2 in the event handler because step 2 also involves closing a document.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So what i need to do is check that the event hander has finished before i start step 2. (I NEED HELP WITH THIS PART)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG title="Capture.PNG" alt="Capture.PNG" src="https://forums.autodesk.com/t5/image/serverpage/image-id/175371iD61F4B8C635AB0AB/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I can't register the event in main, I don't mind exploring alternatives&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;* m_Closehelper closes the opens the new document and closes the current one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2015 12:33:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-do-i-register-that-event-handler-has-finished/m-p/5693074#M71787</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-25T12:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I register that event handler has finished?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-do-i-register-that-event-handler-has-finished/m-p/5697264#M71788</link>
      <description>is it neccessary to use event? are you using below procedure?&lt;BR /&gt;&lt;BR /&gt;    var doc = commandData.Application.ActiveUIDocument.Document;&lt;BR /&gt;    var file = doc.PathName;&lt;BR /&gt;    var doc2 = commandData.Application.OpenAndActivateDocument(placeholderFile);&lt;BR /&gt;    doc.Close(false);&lt;BR /&gt;    TaskDialog.Show("info", "open old one");&lt;BR /&gt;    var uidoc = commandData.Application.OpenAndActivateDocument(file);&lt;BR /&gt;    doc2.Document.Close(false);&lt;BR /&gt;</description>
      <pubDate>Mon, 29 Jun 2015 08:11:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-do-i-register-that-event-handler-has-finished/m-p/5697264#M71788</guid>
      <dc:creator>Aaron.Lu</dc:creator>
      <dc:date>2015-06-29T08:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do I register that event handler has finished?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-do-i-register-that-event-handler-has-finished/m-p/5697303#M71790</link>
      <description>&lt;P&gt;I am basing my code off the building coders article here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2012/12/closing-the-active-document.html" target="_self"&gt;http://thebuildingcoder.typepad.com/blog/2012/12/closing-the-active-document.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I have to use an event becuase it throws an unrecoverable error when i i reopen it too soon so i figgered i had to check to see if the document had fully closed first. i will try your way out in the mean time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, Jack&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2015 09:05:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-do-i-register-that-event-handler-has-finished/m-p/5697303#M71790</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-29T09:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do I register that event handler has finished?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-do-i-register-that-event-handler-has-finished/m-p/5697318#M71791</link>
      <description>No? I don't know what it is or how to use it. I will look into it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Thanks</description>
      <pubDate>Mon, 29 Jun 2015 09:16:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-do-i-register-that-event-handler-has-finished/m-p/5697318#M71791</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-29T09:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do I register that event handler has finished?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-do-i-register-that-event-handler-has-finished/m-p/5699556#M71792</link>
      <description>&lt;P&gt;Thank you thank you thank you. this worked like a charm &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2015 12:57:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-do-i-register-that-event-handler-has-finished/m-p/5699556#M71792</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-30T12:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do I register that event handler has finished?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-do-i-register-that-event-handler-has-finished/m-p/5700918#M71793</link>
      <description>my pleasure &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Wed, 01 Jul 2015 01:53:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-do-i-register-that-event-handler-has-finished/m-p/5700918#M71793</guid>
      <dc:creator>Aaron.Lu</dc:creator>
      <dc:date>2015-07-01T01:53:56Z</dc:date>
    </item>
  </channel>
</rss>

