LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Command Line Arguments Property not working

Hello,
 
I'm trying to pass some user-defined arguments to my application. I tried this example but it doesn't work:
 
 
The Apps.Args property always returns "LabVIEW".
 
 
I used Description.vi to generate the command line and it gives:
"C:\Program Files\National Instruments\LabVIEW 7.1\labview.exe" "C:\Program Files\National Instruments\LabVIEW 7.1\examples\viserver\cmdline.llb\CommandLine.vi" -- "/string:System_Mode_1.ini"
 
I tried with different parameters (boolean, number and string). I tried to move CommandLine.vi to a sub directory that doesn't contain spaces.
I'm using LV 7.1 and I tried the vi on two different computers, one on WinXP Home and the other on WinXP Pro. I don't know what to try next... 😉
 
First, is it normal that the Apps.Args property always returns "LabVIEW"?
 
I really need this to work in order to specify the configuration file to use...
 
Thanks!
0 Kudos
Message 1 of 3
(2,761 Views)
As instructed on the FP, you need to close LabVIEW before running the command. Just exiting to the welcome screen is no enough.
 
And YES, the first parameter is the name of the program. Useful for built application that are not named LabVIEW. 😉
Message 2 of 3
(2,742 Views)

Aaarrgghh!  You're right... It works If I close LV.

Thanks for your help!

0 Kudos
Message 3 of 3
(2,732 Views)