Detecting Revit User Input State in Real-Time via Revit API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dear Revit API Community,
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.
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:
DocumentChanged Event: Unfortunately, this event doesn't seem to be triggered when entering or leaving the line/wall drawing mode.
Tick Event of WPF Window with IDockablePaneProvider: While this event seemed promising, I found that it freezes when Revit is in the aforementioned state.
Idling Event: 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.
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.
Any insights, suggestions, or alternative approaches would be greatly appreciated. Thank you in advance for your assistance.
Best regards