LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a .exe or .ps1 file that first opens a .lvproj and if loaded a .vi from that project?

We have an issue that when we open a .vi before we open the .lvproj file (what has references of that file), we are opening 2 instances of that .vi.

This gives us a situation where some .lvlib files are locked and can no longer be used.
If we first load the .lvproj file and when this is loaded, we run the .vi file, our problem is solved.

 

So I'm looking for a solution where either with a Powershell script I can sequencially open .lvproj and afterwards the .vi.

Or build a .exe file (LabVIEW RTE) that does the same. In this case, the RTE should open LabVIEW, open the .lvproj and run the .vi.
For this .exe, I've created this VI to do that and this is working fine in LabVIEW environment. But when I build it, it gives always ERR 7: Invoke Node in Open_Framework.vi at run-time.

 

MLXCE_0-1618387037561.png

Has someone experience with these kind of tasks?

 

0 Kudos
Message 1 of 3
(1,205 Views)

Hello

 

Why did you opening the VI without .lvproj file?

In case if you have many references to files or subVIs from the VI that you are opening, it is possible that there will be warnings and missings.

It is recommended to open the .lvproj file at first.

Regarding the error 7, this error informing you that the file that you want to call is missing. Have you inserted the file into the application folder? Remember that the application file could be in a different folder than the project folder

0 Kudos
Message 2 of 3
(1,144 Views)

Hello,

 

The thing is that we want to automate a bit the startup of our SW framework. So just clicking on 1 file will open the .lvproj file and the MAIN vi from the framework.

MLXCE_0-1622453278970.png

It is working with this solution. We don't need a script file or executable. We just use a VI since the framework is also just a VI in a LVPROJ file, so LabVIEW anyhow need to start up.
So we startup first the LVPROJ file and afterwards the MAIN vi that is part of that LVPROJ file.

 

Another problem that I see is if the .LVPROJ was already open and you want to open it programmatically again. This definitely cause strange behavior or issues.

So is there a way to check if certain files are already opened in LabVIEW so I can prevent to open them twice?  

0 Kudos
Message 3 of 3
(1,109 Views)