LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Execute VI from Command Line in Windows 7

Solved!
Go to solution

I am trying to open a VI and have it running whenever called from the command line.  I am running Windows 7 and have LabVIEW 2009.

 

I followed this guide to get me started.

 

First I marked my VI to "run when opened":

 

runwhenopened.png

 

I call my program from the command prompt like so:

 

"C:/Program Files/National Instruments/LabVIEW 2009/LabVIEW.exe" "C:/User/Desktop/test.vi"

If I have LabVIEW already open and running from the main menu, then it opens up my VI perfectly without any problem.

 

However if I don't already have LabVIEW open, it opens LabVIEW like it normally does but it only loads to main menu.  It doesn't load my VI at all.

 

Does anyone know if this is expected behavior or how I might fix this so it opens up even if LabVIEW is currently closed?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If someone helped you out, please select their post as the solution and/or give them Kudos!
0 Kudos
Message 1 of 2
(3,897 Views)
Solution
Accepted by topic author MrHappyAsthma

Well.... I got it to work haha.  If you just ignore the document and open the file via the command line, it opens up fine.  I don't know why they tell you to use the LabVIEW.exe command line argument.

 

"C:\User\Desktop\test.vi"

 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If someone helped you out, please select their post as the solution and/or give them Kudos!
Message 2 of 2
(3,893 Views)