<?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: Detecting Revit User Input State in Real-Time via Revit API in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/detecting-revit-user-input-state-in-real-time-via-revit-api/m-p/12611057#M6840</link>
    <description>&lt;P&gt;This state of waiting for a user input inside a command I'm not sure if is possible. The state when Revit ribbons are grayed out is like a busy state, if you are the ribbon, Revit is busy doing another thing (waiting for user input or running a command).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know what your end goal is. But if you want to grey out your modeless WPF Window when Revit is busy, is possible by using the &lt;STRONG&gt;Idling&lt;/STRONG&gt; event and &lt;STRONG&gt;DispatcherTimer&lt;/STRONG&gt;.&lt;BR /&gt;If the &lt;STRONG&gt;Idling&lt;/STRONG&gt; event never trigger in the interval of 1 second, Revit for sure is busy doing something else.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Revit Busy - 2024-03-04 11-32-07.gif" style="width: 300px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1332930iF9126FA694D3EFCA/image-size/small?v=v2&amp;amp;px=200" role="button" title="Revit Busy - 2024-03-04 11-32-07.gif" alt="Revit Busy - 2024-03-04 11-32-07.gif" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is not perfect, but it is a start.&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;</description>
    <pubDate>Mon, 04 Mar 2024 16:41:03 GMT</pubDate>
    <dc:creator>ricaun</dc:creator>
    <dc:date>2024-03-04T16:41:03Z</dc:date>
    <item>
      <title>Detecting Revit User Input State in Real-Time via Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/detecting-revit-user-input-state-in-real-time-via-revit-api/m-p/12610444#M6837</link>
      <description>&lt;P&gt;Dear Revit API Community,&lt;/P&gt;&lt;P&gt;I am currently working on a project where I need to detect a particular state of Revit: when it is awaiting user input, such as during the creation of a line or a wall. During this state, many buttons on the Revit ribbon are grayed out.&lt;/P&gt;&lt;P&gt;I've explored several ideas within the Revit API to detect this state, but so far, I haven't found a working solution. Here are the approaches I've tried:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;DocumentChanged Event&lt;/STRONG&gt;: Unfortunately, this event doesn't seem to be triggered when entering or leaving the line/wall drawing mode.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Tick Event of WPF Window with IDockablePaneProvider&lt;/STRONG&gt;: While this event seemed promising, I found that it freezes when Revit is in the aforementioned state.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Idling Event&lt;/STRONG&gt;: Although this event is typically used to perform background tasks while Revit is idle, it doesn't seem to trigger when Revit is awaiting user input.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Given these challenges, I'm reaching out to the community to see if anyone has encountered a similar requirement or has found a workaround to detect this particular state of Revit in real-time using the Revit API.&lt;/P&gt;&lt;P&gt;Any insights, suggestions, or alternative approaches would be greatly appreciated. Thank you in advance for your assistance.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 09:21:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/detecting-revit-user-input-state-in-real-time-via-revit-api/m-p/12610444#M6837</guid>
      <dc:creator>maxime.touchard7RAK6</dc:creator>
      <dc:date>2024-03-04T09:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting Revit User Input State in Real-Time via Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/detecting-revit-user-input-state-in-real-time-via-revit-api/m-p/12610536#M6838</link>
      <description>&lt;P&gt;Pretty tricky, meseems, and nothing official that I can think of. We occasionally discussed checking whether code is currently in a valid Revit API, most recently here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/2024/01/valid-revit-api-context-llm-and-ltg.html#2" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/2024/01/valid-revit-api-context-llm-and-ltg.html#2&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your question is related, but different, I guess. Looking forward to hearing what others think and how you end up solving this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 10:20:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/detecting-revit-user-input-state-in-real-time-via-revit-api/m-p/12610536#M6838</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2024-03-04T10:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting Revit User Input State in Real-Time via Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/detecting-revit-user-input-state-in-real-time-via-revit-api/m-p/12610899#M6839</link>
      <description>&lt;P&gt;Oh, and another very useful-looking contribution that you definitely ought to check out in this context:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;How to know if Revit API is in Context&lt;BR /&gt;&lt;A href="https://forums.autodesk.com/t5/revit-api-forum/how-to-know-if-revit-api-is-in-context/td-p/12574320" target="_blank"&gt;https://forums.autodesk.com/t5/revit-api-forum/how-to-know-if-revit-api-is-in-context/td-p/12574320&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 13:39:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/detecting-revit-user-input-state-in-real-time-via-revit-api/m-p/12610899#M6839</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2024-03-04T13:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting Revit User Input State in Real-Time via Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/detecting-revit-user-input-state-in-real-time-via-revit-api/m-p/12611057#M6840</link>
      <description>&lt;P&gt;This state of waiting for a user input inside a command I'm not sure if is possible. The state when Revit ribbons are grayed out is like a busy state, if you are the ribbon, Revit is busy doing another thing (waiting for user input or running a command).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know what your end goal is. But if you want to grey out your modeless WPF Window when Revit is busy, is possible by using the &lt;STRONG&gt;Idling&lt;/STRONG&gt; event and &lt;STRONG&gt;DispatcherTimer&lt;/STRONG&gt;.&lt;BR /&gt;If the &lt;STRONG&gt;Idling&lt;/STRONG&gt; event never trigger in the interval of 1 second, Revit for sure is busy doing something else.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Revit Busy - 2024-03-04 11-32-07.gif" style="width: 300px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1332930iF9126FA694D3EFCA/image-size/small?v=v2&amp;amp;px=200" role="button" title="Revit Busy - 2024-03-04 11-32-07.gif" alt="Revit Busy - 2024-03-04 11-32-07.gif" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is not perfect, but it is a start.&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;</description>
      <pubDate>Mon, 04 Mar 2024 16:41:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/detecting-revit-user-input-state-in-real-time-via-revit-api/m-p/12611057#M6840</guid>
      <dc:creator>ricaun</dc:creator>
      <dc:date>2024-03-04T16:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting Revit User Input State in Real-Time via Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/detecting-revit-user-input-state-in-real-time-via-revit-api/m-p/12611816#M6841</link>
      <description>&lt;P&gt;Hello &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/824630"&gt;@jeremy_tammik&lt;/a&gt; and &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4176855"&gt;@ricaun&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your assistance.&lt;/P&gt;&lt;P&gt;Our objective aligns closely with the solutions you've suggested, with a slight variation. Instead of utilizing modeless windows, we're employing DockablePane. Our functionalities remains accessible at all times, even when Revit is in a "busy" state. Our primary challenge arises when users continuously interact with buttons without comprehending why no action is occurring. This scenario underscores the necessity for a clear indication or notification mechanism to alert users when Revit enters such states, facilitating a smoother user experience.&lt;/P&gt;&lt;P&gt;Warm regards&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 16:34:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/detecting-revit-user-input-state-in-real-time-via-revit-api/m-p/12611816#M6841</guid>
      <dc:creator>maxime.touchard7RAK6</dc:creator>
      <dc:date>2024-03-04T16:34:25Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting Revit User Input State in Real-Time via Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/detecting-revit-user-input-state-in-real-time-via-revit-api/m-p/12640720#M6842</link>
      <description>&lt;P&gt;Hi maxime,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know if I understood correctly, but do you want to implement something similar to the AutoCAD &lt;STRONG&gt;CommandWillStart&lt;/STRONG&gt; event to know when the user starts a Revit command? I had to implement my own CommandWillStart and CommandEnded to add an option to the options bar when the user starts the native command to model beams.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6348905227112w864h540r507" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6348905227112" data-account="6057940548001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6057940548001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6348905227112w864h540r507');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://forums.autodesk.com/t5/video/gallerypage/video-id/6348905227112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 14:54:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/detecting-revit-user-input-state-in-real-time-via-revit-api/m-p/12640720#M6842</guid>
      <dc:creator>Speed_CAD</dc:creator>
      <dc:date>2024-03-14T14:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: Detecting Revit User Input State in Real-Time via Revit API</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/detecting-revit-user-input-state-in-real-time-via-revit-api/m-p/12643432#M6843</link>
      <description>&lt;P&gt;It seems like you want to prompt the user if there's an open transaction hindering the other add-in executions. I've experienced something similar in Dynamo, where running a script is delayed until an active transaction, like drawing a wall or completing the dimension, is closed. If that's the issue, you might need to retrieve active transaction details and show a prompt requesting user to close that transaction.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2024 15:27:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/detecting-revit-user-input-state-in-real-time-via-revit-api/m-p/12643432#M6843</guid>
      <dc:creator>me16nirmal97</dc:creator>
      <dc:date>2024-03-15T15:27:52Z</dc:date>
    </item>
  </channel>
</rss>

