- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This is something that's come up a few times with my coworkers, that it would be nice to be able to place an element then press a key to rotate it so many degrees. After looking into it, it seems you can detect keys through a form or with some sort of hook but I was wondering if it were possible to attach this to Revit somehow.
I started trying to test this by grabbing the UIApplication.MainWindowHandle and using the user32.dll method to register a hotkey and overriding WndProc to perform a command, which was based on an example I found for doing this through Forms. I was able to register the key (as it stopped functioning until I closed Revit) but it still didn't seem to be able to detect it. I assume the WndProc method isn't going to work with anything other than a Form, but is there any other way to go about doing this within the Revit api?
Solved! Go to Solution.