Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Launching a VI from the Command Line

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

To launch a VI from the command line (such as by selecting Start»Run on Windows), use the following syntax:

c:\labview\labview.exe <path to VI relative to the labview directory>

For example, to launch readme.vi in c:\labview\examples, use the following command:

c:\labview\labview.exe examples\readme.vi

If the VI is located in a directory other than the labview directory, you must specify the full path to the VI, as shown in the following example:

c:\labview\labview.exe c:\coolapp\mycool.vi

If a directory in the path contains spaces, you must enclose the path in quotation marks, as shown in the following example:

c:\labview\labview.exe "c:\cool application\mycool.vi"

If the VI is in an LLB, use one of the following ways:

  • Place the full path in quotation marks, as shown in the following example:

    c:\labview\labview.exe "c:\coolapp\eagle.llb\mycool.vi"

  • Select Tools»LLB Manager and mark the VI as top level. In this case, you need to specify only the path to the LLB. LabVIEW opens the LLB Manager window, as shown in the following example:

    c:\labview\labview.exe "c:\coolapp\eagle.llb"

You also can pass LabVIEW-defined or user-defined arguments when you launch LabVIEW from the command line. To pass user-defined arguments in the command line, enter two hyphens (--) surrounded by spaces before the set of user-defined arguments. LabVIEW does not use any arguments after the two hyphens to launch labview.exe. LabVIEW passes the arguments after the two hyphens to the block diagram of the VI you launch. Use the Application:Command Line Arguments property to read the user-defined command-line arguments passed when LabVIEW launches.

For example, to launch mycool.vi and pass user-defined arguments, use the following command:

c:\labview\labview.exe c:\coolapp\mycool.vi -- 1000 sine

On the block diagram of the mycool.vi, use the Application:Command Line Arguments property to read the 1000 and sine arguments you passed and handle the values. For example, you can wire the argument values to a Case structure selector terminal.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit