LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

passing files into labview vi by opening the file

I have a labview exe that is installed on XP that can create/save files with an extension not recognized by windows. The files can be opened from within the exe but what I want is to double click(open) the file from explorer/desktop and have it opened in my vi. I know how to associate the file with windows so opening it will open the exe, but how do I pass this argument into my exe so my app can use it?
0 Kudos
Message 1 of 3
(3,424 Views)
Us the "Application:command line" property, see attached code image.

When building the application, make sure to check "Pass all command line arguments to application" in the builder.

When your associated file is double-clicked, the application will open and have the file name of the double-clicked file as second element (#1) in the commandline array. (You can also drop any file on the application in explorer and it will open with the dropped file name in that position.)

Also check the online help under index: "Command Line Arguments (Application property)"
Message 2 of 3
(3,424 Views)
Thank you, That's what I needed. I wasn't sure how to read from the command line once I passed something in.
0 Kudos
Message 3 of 3
(3,424 Views)