Revit UI Becomes Unresponsive

Revit UI Becomes Unresponsive

Anonymous
Not applicable
1,439 Views
4 Replies
Message 1 of 5

Revit UI Becomes Unresponsive

Anonymous
Not applicable

Hello All,

     I apologize in advance for the lack of information in this post, but due to the nature of the issue, it is very difficult to gather useful data. I am curious to see how many other Revit users have encountered this same issue, as I am starting to fear that it may be a side-effect of the way I've been messing around with the Revit API. The issue is that, sometimes, when launching a document in Revit, the entire Revit UI suddenly becomes completely unresponsive after the document splash screen appears. All UI elements are frozen and the application can't even be closed without either canceling the Debug through Visual Studio or force-closing the application through Windows Task Manager. If I had to account for a frequency, I would say that this issue occurs about once every 12-15 document initiations. I also can't say that it's entirely confined to Revit 2017.2, as I believe I have encountered it in both 2016 and 2018, but I don't use them as frequently to be sure. It would make sense if this issue is unknown to Autodesk on some larger scale because it's definitely not a crash and therefore doesn't report the app failure back to the Autodesk Dev Team. 

 

     Thank You Very Much,

                       James M. Kerfoot

0 Likes
Accepted solutions (1)
1,440 Views
4 Replies
Replies (4)
Message 2 of 5

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear James,

 

Thank you for your query and update to the automatically generated ADN case 14170467 [Revit UI Becomes Unresponsive].

 

You explained that you were able to solve the problem yourself, and that Revit was becoming unresponsive because the 'Open Project' dialogue was displayed off-screen, resulting in a locked Revit main window and an inaccessible dialog window.

 

I agree that it would help to allow the dialogue boxes to be viable from the windows peek feature, hovering over the Revit icon in the taskbar.

 

Thank you for the good suggestion!

 

I will mark this query as resolved here in the forum now.

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 5

Anonymous
Not applicable

We are encountering an issue where one of our dialog boxes appears behind Revit and causes the app to become unresponsive. You mentioned this was solved or that the OP was able to resolve it on their own, may I ask how? If Windows Aero Peek isn't supported for these dialogs, how can we ensure the dialog appears on top of the main window?

 

Thanks,

Lili

0 Likes
Message 4 of 5

Anonymous
Not applicable

Hello Lili,

     I didn't exactly find a long-term solution for this, besides right clicking on the windows taskbar and selecting "Cascade Windows" every time Revit freezes up. I'm a little confused on whether you are referring to issues with your own addin or not. If this is an issue with your own addin, try resetting the focus window:

https://stackoverflow.com/questions/10898560/how-to-set-focus-to-another-window

Message 5 of 5

jeremytammik
Autodesk
Autodesk

Dear Lili,

 

The situation you describe, 'one of our dialog boxes appears behind Revit', can easily be avoided.

 

Both Windows.Forms methods to display a form, `Show` and `ShowDialog`, take an optional parent window argument.

 

If you retrieve the Revit main window handle and pass that in there, your form is properly parented by Revit and will always appear on top of Revit. If will also minimise and restore together with Revit as one would expect.

 

The Revit 2019 provides two new properties to allow access to the handle of the Revit main window:

 

http://thebuildingcoder.typepad.com/blog/2018/04/whats-new-in-the-revit-2019-api.html#4.1.4.1

 

In previous versions, I addressed this using the JtWindowHandle helper class:

 

http://thebuildingcoder.typepad.com/blog/2017/10/modeless-form-keep-revit-focus-and-on-top.html#10

 

I hope this resolves the issue for you.

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes