Responsive Revit Add-In Window

Responsive Revit Add-In Window

karim_abdelraziq
Participant Participant
283 Views
2 Replies
Message 1 of 3

Responsive Revit Add-In Window

karim_abdelraziq
Participant
Participant

I'm looking for a way to make the Add-in window in Revit responsive most of the time, so I'd like to hear your opinion on Approach 3 in below Image and any issues that might arise. I have used it in the indicator, cancellation window, and as the main window in the add-in as an experiment, and there weren’t any major issues.

 GitHub link for simple Implementation of this Approach: Link

 

 

 

karim_abdelraziq_1-1742619550632.png

 

 

0 Likes
284 Views
2 Replies
Replies (2)
Message 2 of 3

jeremy_tammik
Alumni
Alumni

So many Mian windows...  🙂

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 3

karim_abdelraziq
Participant
Participant

Dear Mr. Jeremy,

 

Thank you for your comment.

To clarify, there aren't actually many main windows - there are only two UI main threads: one for the Revit UI itself and one for my Add-in Windows.

The thread references are kept in a central location within my code, allowing me to reinitialize the add-in's main window in the same thread if it gets closed or/and close any existing window in the thread before initializing a new window.

Any dependent/child windows will be created in the same Add-in UI thread, not as separate main windows. This approach allows me to block the main Add-in window with its child windows when needed, while still keeping the entire Add-in interface responsive independently from Revit's UI thread. This thread will be a background thread which will be Stopped [ quit] if the parent thread (Revit main UI Thread) finishes its work [terminated].

 

Thanks

Karim.