01-13-2012 05:03 AM
I’ve just started updating the first of several test rig programs to run on new Windows 7 PCs. I’ve converted the old program to LV 2011 on a Windows XP computer and then run the built exe on the new, Windows 7, PC.
Everything is working OK except the File Dialog vi. I’ve set the ‘Start Path’ to a default location, but the executable always goes to the last used location. Looking at the help file, the File Dialog reverts to the last used location when the ‘Start Path’ is invalid. I’ve checked the path and there’s no problem with my default location. I should add that the exe program works as expected when I run it on the Windows XP computer. The problem only occurs when it’s run on the Windows 7.
I’ve started from scratch with a simple program (attached) and get the same behaviour.
I can’t find anything on the NI site relating to this behaviour, has anyone seen anything odd with this vi, or have any ideas?
Thanks
Ian
Solved! Go to Solution.
01-13-2012 05:23 AM
It works as expected on my win7pro machine (lv 2011).
Have you tried using native vi's than express vi's? You can specify the start path using a property node.
01-13-2012 05:57 AM
Thanks aCe
It's interesting that it works on your win7 machine. It may be down to 32/64 bits. I can't spend any more time trying to get to the bottom of the express vi option.
I've tried your idea of using a property node and I've now got a working solution for my application.
Thanks for the help.
Ian
10-31-2012 11:39 AM
I know this is old, but for posterity - I was having the same problem when calling the File Dialog express vi from TestStand, and it turned out I wasn't escaping my backslashes in the "start path" field with extra backslashes.
11-02-2012 04:27 AM
Thanks for the information, ncolson.
I'm using a file constant, so any extra escape characters are automatically removed.
I never did find a satisfactory solution to my problem, although .aCe. ‘s solution worked in principal because of my program flow I couldn’t use it in practice, I really needed the file dialogue box. My program users have to re-navigate back to the default location manually (although it does work at program startup).
I’ve been using the File dialogue since at least version 7 with no problems. The first time I noticed this behaviour was in version 10, that’s all I have access to at the moment so I can’t say what happens in the latest version.