Showing results for 
Search instead for 
Did you mean: 

Autorun VI from command line



I've got a VI which I'm still, er, "debugging" :-)


I want to set it up so it runs automatically, but also have the option of editing it if necessary. Therefore, I don't want to set the "Run when opened" VI property.


Is there a command line option to start Labview and run a VI automatically? E.g. something like:


"<path to LV exe>\labview.exe" "<path to VI>\" /run


I could then make this into a shortcut and put it in the Windows startup folder.


However, it would mean I also have the option of starting Labview normally and opening without it going off and doing all sorts of stuff before I get a chance to stop it.


Or have I missed something somewhere?





0 Kudos
Message 1 of 4

The list of supported command line options for LabVIEW does not have such a switch. You can, instead, do this using the VI Server by creating a separate VI that's set to "run when opened" that will open a reference to your VI and run it.



You can pass user-defined command line options to LabVIEW which you can then read into this "runner" VI. There's an example that ships with LabVIEW showing you how to parse user-defined command line options. Open the Example Finder and search for "command".

Message 2 of 4

If you drop a Run when open VI in another VI and open it from the block diagram...



0 Kudos
Message 3 of 4
0 Kudos
Message 4 of 4