<?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: Properties Dialog doesnt accept input when commit transaction durig Idle eve in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/properties-dialog-doesnt-accept-input-when-commit-transaction/m-p/7774723#M52549</link>
    <description>&lt;P&gt;So any time an Idling transaction is committed, Revit is going to "reset" the Properties dialog to its last state and any in-progress entry will be lost.&lt;/P&gt;
&lt;P&gt;So if I am changing the value of an instance parameter from "hello" to "goodbye" and I've typed "good" and then the idle event triggers and commits its transaction, Revit will reset the text box value to "hello".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that's the reality, then a solution could be to know if the Properties dialog has focus and, if it does, do not run the idling event code. Is there a Revit event that fires when the Properties dialog gets focus? Or use Windows Automation API?&lt;/P&gt;</description>
    <pubDate>Tue, 13 Feb 2018 17:14:51 GMT</pubDate>
    <dc:creator>boostyourbim</dc:creator>
    <dc:date>2018-02-13T17:14:51Z</dc:date>
    <item>
      <title>Properties Dialog doesnt accept input when commit transaction durig Idle event</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/properties-dialog-doesnt-accept-input-when-commit-transaction/m-p/7768959#M52544</link>
      <description>&lt;P&gt;This idling event is registered on startup. As expected, it sets the active view's Title on Sheet when Revit goes idle. (this is just a test case, my real application does other things)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problems as shown in the screencast is that it is now impossible to use the Revit Properties Dialog. When I try to type text input (like to change the height of the wall) Revit does not accept the input. When I try to select from a drop-down list, the list does not function properly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I modify the document on Idle and also have the Properties Dialog continue to work?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;        public Autodesk.Revit.UI.Result OnStartup(UIControlledApplication application)
        {
            application.Idling += Application_Idling;
        }

        private void Application_Idling(object sender, IdlingEventArgs e)
        {
            UIApplication uiapp = sender as UIApplication;
            Document doc = uiapp.ActiveUIDocument.Document;

            using (Transaction t = new Transaction(doc, "set date"))
            {
                t.Start();
                doc.ActiveView.LookupParameter("Title on Sheet").Set(DateTime.Now.ToString());
                t.Commit();
            }           
        }&lt;/PRE&gt;</description>
      <pubDate>Sun, 11 Feb 2018 14:34:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/properties-dialog-doesnt-accept-input-when-commit-transaction/m-p/7768959#M52544</guid>
      <dc:creator>boostyourbim</dc:creator>
      <dc:date>2018-02-11T14:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Properties Dialog doesnt accept input when commit transaction durig Idle eve</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/properties-dialog-doesnt-accept-input-when-commit-transaction/m-p/7772161#M52545</link>
      <description>&lt;P&gt;Screencast at &lt;A href="https://knowledge.autodesk.com/community/screencast/87c8e255-2670-4f67-9743-0e2c786b1f9b" target="_blank"&gt;https://knowledge.autodesk.com/community/screencast/87c8e255-2670-4f67-9743-0e2c786b1f9b&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 20:39:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/properties-dialog-doesnt-accept-input-when-commit-transaction/m-p/7772161#M52545</guid>
      <dc:creator>boostyourbim</dc:creator>
      <dc:date>2018-02-12T20:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Properties Dialog doesnt accept input when commit transaction durig Idle eve</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/properties-dialog-doesnt-accept-input-when-commit-transaction/m-p/7773317#M52546</link>
      <description>&lt;P&gt;Hi Harry,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;may it be that there are &lt;STRONG&gt;lots of&lt;/STRONG&gt; "set date" transactions in the undo stack?&lt;/P&gt;
&lt;P&gt;OnIdling event is fired often, you may see the displayed &lt;EM&gt;seconds&lt;/EM&gt; changing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think it is a timing problem.&lt;/P&gt;
&lt;P&gt;Your &lt;EM&gt;manual&lt;/EM&gt; transaction is made invalid by the &lt;EM&gt;onIdling&lt;/EM&gt; transaction, it just &lt;EM&gt;overtakes&lt;/EM&gt; you when typing your manual input.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So what about integrating a delay?&lt;/P&gt;
&lt;P&gt;Also, if your timestamp could be rounded to minutes, you could compare the previous value with the new one and only set the parameter if there is a difference, omitting unnecessary transactions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Revitalizer&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 08:54:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/properties-dialog-doesnt-accept-input-when-commit-transaction/m-p/7773317#M52546</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2018-02-13T08:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Properties Dialog doesnt accept input when commit transaction durig Idle eve</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/properties-dialog-doesnt-accept-input-when-commit-transaction/m-p/7773975#M52547</link>
      <description>&lt;P&gt;Hi - I don't understand the idea that "Your manual transaction is made invalid by the onIdling transaction"? What is the "onIdling transaction"? If I remove the transaction start &amp;amp; commit from my code there is an error "Attempt to modify the model outside of transaction." Autodesk's documentation says:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="mainSection"&gt;
&lt;DIV id="mainBody"&gt;
&lt;DIV id="allHistory"&gt;
&lt;DIV id="remarksSection"&gt;
&lt;P&gt;"Handlers of this event are permitted to make modifications to any document (including the active document)...In order to change a document, you must begin a new transaction for that document"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In any case, my example of setting this parameter is for testing &amp;amp; demonstration purposes. I do need to commit a transaction every time Revit goes idle and it seems like an Autodesk bug that the Properties Dialog in unusable in this situation.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 13 Feb 2018 13:39:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/properties-dialog-doesnt-accept-input-when-commit-transaction/m-p/7773975#M52547</guid>
      <dc:creator>boostyourbim</dc:creator>
      <dc:date>2018-02-13T13:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Properties Dialog doesnt accept input when commit transaction durig Idle eve</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/properties-dialog-doesnt-accept-input-when-commit-transaction/m-p/7774044#M52548</link>
      <description>&lt;P&gt;Hi again,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;what I wanted to say is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Each entry in the undo stack represents a transaction, either done by the user or by code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you change a parameter &lt;EM&gt;manually&lt;/EM&gt;, the transaction is committed when you press the Apply button or when you move your mouse pointer from property sheet to a view.&lt;/P&gt;
&lt;P&gt;That manual movement for committing may &lt;EM&gt;take some time&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The transaction in the Application_Idling event (the "onIdling" transaction), on the other hand, will be committed much faster: when Revit executes the t.Commit(), that means &lt;EM&gt;nearly instantly&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's just a &lt;EM&gt;man versus machine&lt;/EM&gt; thing, your code is faster than you.&lt;/P&gt;
&lt;P&gt;Your changes are never committed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Revitalizer&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 14:01:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/properties-dialog-doesnt-accept-input-when-commit-transaction/m-p/7774044#M52548</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2018-02-13T14:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Properties Dialog doesnt accept input when commit transaction durig Idle eve</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/properties-dialog-doesnt-accept-input-when-commit-transaction/m-p/7774723#M52549</link>
      <description>&lt;P&gt;So any time an Idling transaction is committed, Revit is going to "reset" the Properties dialog to its last state and any in-progress entry will be lost.&lt;/P&gt;
&lt;P&gt;So if I am changing the value of an instance parameter from "hello" to "goodbye" and I've typed "good" and then the idle event triggers and commits its transaction, Revit will reset the text box value to "hello".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that's the reality, then a solution could be to know if the Properties dialog has focus and, if it does, do not run the idling event code. Is there a Revit event that fires when the Properties dialog gets focus? Or use Windows Automation API?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 17:14:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/properties-dialog-doesnt-accept-input-when-commit-transaction/m-p/7774723#M52549</guid>
      <dc:creator>boostyourbim</dc:creator>
      <dc:date>2018-02-13T17:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Properties Dialog doesnt accept input when commit transaction durig Idle eve</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/properties-dialog-doesnt-accept-input-when-commit-transaction/m-p/7776529#M52550</link>
      <description>&lt;P&gt;Hi Harry,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;afaik, there is no such event.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the Sheet's title, would it be sufficient if the TimeStamp is set only&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;when a user &lt;EM&gt;opens&lt;/EM&gt; the Sheet?&lt;/LI&gt;
&lt;LI&gt;when the file is about to be saved/synchronized?&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the first case, you could use UIControlledApplication.ViewActivated - if the ViewActivatedEventArgs.CurrentActiveView is your Sheet, update the TimeStamp.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't see a reason for a continuous update - it fills the undo history with a lot of transactions, making it difficult for the user to rollback any other transaction.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Revitalizer&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2018 09:53:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/properties-dialog-doesnt-accept-input-when-commit-transaction/m-p/7776529#M52550</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2018-02-14T09:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: Properties Dialog doesnt accept input when commit transaction durig Idle eve</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/properties-dialog-doesnt-accept-input-when-commit-transaction/m-p/7813012#M52551</link>
      <description>&lt;P&gt;Hi Harry,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Couple thoughts on this issue.&lt;/P&gt;
&lt;P&gt;1. If you can, have you tried moving this code into an external event and raising it from the idling event? (if it's not already pending)&lt;/P&gt;
&lt;P&gt;2. Could you potentially (additionally) implement a delay counter?&amp;nbsp; (would allow you to tune the frequency with which the event is raised from the idling event)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Ken&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 16:36:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/properties-dialog-doesnt-accept-input-when-commit-transaction/m-p/7813012#M52551</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-27T16:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Properties Dialog doesnt accept input when commit transaction durig Idle eve</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/properties-dialog-doesnt-accept-input-when-commit-transaction/m-p/7813076#M52552</link>
      <description>Thanks Ken. Have already done #2. Will consider trying #1.&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Feb 2018 17:00:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/properties-dialog-doesnt-accept-input-when-commit-transaction/m-p/7813076#M52552</guid>
      <dc:creator>boostyourbim</dc:creator>
      <dc:date>2018-02-27T17:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Properties Dialog doesnt accept input when commit transaction durig Idle eve</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/properties-dialog-doesnt-accept-input-when-commit-transaction/m-p/7813544#M52553</link>
      <description>&lt;P&gt;Thanks very much to Revitalizer and Ken for their insightful advice.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just for your information (and my own forgetfulnes -- hhrrrmm, tracking), this issue has also been reported in ADN case &lt;U&gt;&lt;STRONG&gt;13899743&lt;/STRONG&gt;&lt;/U&gt; [Conflict between Idle event and Properties Palette in Revit].&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I agree with the analysis discussed above and would suggest using an external event if possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In fact, I suggest ALWAYS using an external event rather than an Idling event, if possible:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.28" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.28&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Especially -- Replacing an Idling Event Handler by an External Event:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2013/12/replacing-an-idling-event-handler-by-an-external-event.html" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2013/12/replacing-an-idling-event-handler-by-an-external-event.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 19:42:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/properties-dialog-doesnt-accept-input-when-commit-transaction/m-p/7813544#M52553</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-02-27T19:42:13Z</dc:date>
    </item>
  </channel>
</rss>

