LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unexpected behaviour with File Dialog vi

Solved!
Go to solution

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

0 Kudos
Message 1 of 5
(2,593 Views)
Solution
Accepted by topic author IanW

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.

startpath.png


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
Message 2 of 5
(2,581 Views)

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

0 Kudos
Message 3 of 5
(2,577 Views)

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.

Message 4 of 5
(2,507 Views)

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.

0 Kudos
Message 5 of 5
(2,487 Views)