Author:Ralph Wessel
Posted: Thu Dec 29, 2016 9:37 pm (GMT+1)
I think this is the source of your problem. Your WPF window is running in parallel with ARCHICAD on a separate thread and receiving events directly through the OS, i.e. not through ARCHICAD. Add-ons normally run on the same thread as the core functionality of ARCHICAD, so these processes do not run in parallel (and are not currently designed to do so). Attempting to call into API functions in parallel with ARCHICAD's main thread is unlikely to work and would likely lead to unpredictable behaviour.
I recommend you drop WPF and use the native UI components of the ARCHICAD API.
_________________
Ralph Wessel
Cadimage
Posted: Thu Dec 29, 2016 9:37 pm (GMT+1)
mar_kq wrote: | ||
We have a WPF component used in other applications. I am using a WinForm Window to "host" the WPF, and I use the "Show" method. The WPF UI works just fine. |
I think this is the source of your problem. Your WPF window is running in parallel with ARCHICAD on a separate thread and receiving events directly through the OS, i.e. not through ARCHICAD. Add-ons normally run on the same thread as the core functionality of ARCHICAD, so these processes do not run in parallel (and are not currently designed to do so). Attempting to call into API functions in parallel with ARCHICAD's main thread is unlikely to work and would likely lead to unpredictable behaviour.
I recommend you drop WPF and use the native UI components of the ARCHICAD API.
_________________
Ralph Wessel
Cadimage