ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Example for 'Get Command Line Arguments VI'

Hello all,

 

I have been trying to understand this VI, but I I am unable to. 'Arguments array' output is always empty. I went through the Help file, but I felt any examples makes me understand the implementation/purpose of this VI better. Can anyone share examples/the use cases of this VI. Thank you.

 

with regards

Adithya

0 Kudos
Message 1 of 4
(1,761 Views)

It only does something if you start the executable with command line arguments.

 

The executable is LabVIEW.exe, or your build application.

0 Kudos
Message 2 of 4
(1,741 Views)

Note also that if you build an application, you'll need to check a box in the build spec to explicitly *enable* command line arguments to be accessed by your program.  This box is *unchecked* by default

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 3 of 4
(1,724 Views)

As a bonus, if you want to act on files being dropped on the executable while it's running, use OS Document Open and OS Document Open? events.

 

One of those will be triggered when a document is passed when starting the exe, the other is triggered when you drop a file on the exe or a shortcut (in Windows Explorer). These events don't require the flag in the build to be set.

Message 4 of 4
(1,702 Views)