11-01-2010 04:35 AM
Hello all,
First, I use LabVIEW 2010 32 bit with Windows 7.
Now my little problem. I want my computer to launch LabVIEW after restarting the computer. Then I want my current LabVIEW- project to be opened and then I want the main VI of this project to be opened.
Currently I do this using a program named "Startup Delayer", this allows me to set a timeout to start various programs. It starts programs in the same way you would do it from the command line.
I configured this Statup Delayer to start the project file with the following commandline:
"C:\program files\NI\LabVIEW.exe" "C:\projects\myProject.lvproj"
Then I open the Main VI with a delay of 90 seconds:
"C:\program files\NI\LabVIEW.exe" "C:\projects\myMainVI.vi"
This often works, but sometimes not. If it doesn't work, a second instance of LV is opened (though this is normally not possible) and in this instance the Main VI is loaded. So if I start to program and create new VIs, they are not added to the project, because my Main VI wasn't opened in the context of the LabVIEW project.
I suppose it ist a performance issue, so if I increase the delay time to 2 minutes, it is very likely, that everything is fine.
But I think, this is not a very elegant way.
So is there a way to open a VI in the context of a project file from the commandline?
Thanks in advance for your help,
dave
11-01-2010 08:01 AM - edited 11-01-2010 08:02 AM
Hello daveTW,
I have achieved the same without command line. I don't know if this will help you or not.
Still I will post the code here.
You can make exe of this code and put it in the Start up, so that when you start your computer this exe will run
and will invoke project and vi you want to open. Let me know how you find this vi, also if there is any bug in this vi.
Regards
11-01-2010 10:39 AM
Hello gak
thanks for your VI. I will have a look at it tomorrow.
greets, Dave
11-03-2010 01:27 AM
Hi Dave,
Did you find it useful?