07-28-2014 08:05 AM
I have an application that can launch one or more instances of the same executable using "System Exec" VI, the option "Wait until completion?" false. My problem is that I want to transmit a different value for each instance, to an input parameter. Something like that if you launch notpad.exe, followed by a file name. The executable file is an build application from LabVIEW too.
How can I do this?
Best Regards,
Solved! Go to Solution.
07-28-2014 08:12 AM
Passing command line parameters into a LabVIEW application is actually fairly straightforward.
There are 2 things you need to do:
- Modify the LabVIEW exe build specification to pass all command line arguments to application
- Read the App.Args property which returns an array of strings for the parameters - the first parameter is always LabVIEW.exe.
For an example:
Here I read the arguments, ignore the LabVIEW.exe and then read a file path as the first argument and check it exists and there's also an optional "-choose" parameter which determines whether or not to show the UI.
Information is here: http://digital.ni.com/public.nsf/allkb/17C3AD70493CE0208625666A00763364
07-28-2014 10:44 AM
Thank you very much! It worked very well!
Best Regards,