06-21-2023 07:37 AM
Hello,
I had created an application in Teststand that was using a LabWindows/CVI dll that was allowing a popup to be launched that allows File Explorer to open and select a file. It was working two weeks ago when I checked but hadn't tried it since then. After that I hadn't changed my code at all, but had installed Teststand 2019, LabWindows/CVI 2019 and LabVIEW 2019 in addition to the 2013 versions that existed. It seems as though installing the other versions of the NI Tools messed up something that I am unable to fix. Please let me know what could be the cause of this issue. I will attach the error message below.
06-22-2023 08:52 AM
Popup dialogues require a specific multithreading model to be run and throw an error if run in a different one. I don't know why you didn't see the error before but you mention the installation of a newer CVI release and this could be the reason: installing a new IDE updates the CVI Run-time Engine as well so the switch from 2013 RTE to 2019 could explain this.
A simple search on the forum with "MTA" keyword will show you several discussions where you can find explanations and solutions. but basically you need to initialize your thread in a specific way to run FileSelectPopup safely. This could conflict with other functions you are calling in your code, as a last resource you may be forced to spawn a new thread just to handle the popup in a proper way.