
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've built a C# based plugin that works in AutoCAD, Revit, Navisworks and Inventor. The plugin creates a dockable "window" in each application to host it's WPF content. This works great in all applications except for Inventor.
In Inventor, I am forced to create a Windows Form that contains a single ElementHost who's child is set to the plugin's main content. This is then placed inside an Inventor DockableWindow using AddChild.
Here's the problem:
Textboxes in my WFP application do not receive most keyboard input. The only keys which seem to work are control keys and spacebar. I can highlight, copy and paste fine from the textboxes, but I cannot type characters (the typing caret is present).
I've read about people with similar issues and many of them mention ElementHost.EnableModelessKeyboardInterop. However this will not work for me, because EnableModelessKeyboardInterop expects a WPF window, while my plugin only contains a UserControl.
Another interesting thing is that the plugin work fine in Inventor 2015-2017. Only version 2018 and higer experience the no-keyboard-input issue.
Any help with this would be greatly appreciated.
Solved! Go to Solution.