LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with opening a VI by reference and application builder

Solved!
Go to solution

I have looked at a few threads but I am still confused.  I am building an application where I am opening a few panels on demand, by reference. It works great as a project but I cannot get the installer to work. Attached is an example of how I am opening the VI by reference.

The threads I saw indicated I needed to include the VI's I am calling by reference in my application builder as support files, which I have done under Always Include. But it still says the files do not exist when I run the EXE.

I tried a few things with static references and so on, but am having nothing but trouble.

Any advice is appreciated.

 

Note in the example I included a build path in the VI that I normally do outside the VI, for reference.

0 Kudos
Message 1 of 8
(1,177 Views)

In your filepath, you have a filename with an exclamation point in it.  I think that is an error. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 8
(1,168 Views)

That's just dummy text. Not the actually file name I am using. I am using a normal file name.

0 Kudos
Message 3 of 8
(1,161 Views)

Probably the file is not where you expect it to be.  In your pop-up dialog, include the path.  Then you can check that against the actual location where the AB is putting it.

 

Show me the code that sends the file path to "CreateSubpanels.vi"; maybe I'll be able to see a problem.

0 Kudos
Message 4 of 8
(1,130 Views)

@DBISI wrote:

I tried a few things with static references and so on, but am having nothing but trouble.

Any advice is appreciated.

 


I exclusively use static references for things like this.  It guarantees the file is built into the EXE and you can use a property node on it to get the "VI path" to load it from inside said EXE.

 

Or are you trying to run a VI not inside the EXE that you can change later without remaking the EXE?  That's a whole different thing.

0 Kudos
Message 5 of 8
(1,112 Views)

I am only trying to pop VI's that are pre-compiled in the EXE. I wont be making any changes. I am not planning on using a .vi library or anything.

 

The file paths work perfectly in the labview project. But for whatever reason, the VI's are not found in the .exe. I have a debug that shows the filepath looking for the .vi file in the same folder as the .exe, when I really want it to just reference the.vi IN the .exe.

 

The file build process was shown in the example. It's the exact code I use. I realize I am doing something wrong with the file path, just not sure what just yet.

 

But I am gonna try something on Monday. I think I made this way more complicated than it should be, now that I think about it. I was starting with some demo code I looked at and went down a path I don't think I needed to.

0 Kudos
Message 6 of 8
(1,088 Views)

@DBISI wrote:

I am only trying to pop VI's that are pre-compiled in the EXE. I wont be making any changes. I am not planning on using a .vi library or anything.

 

 


In that case, the simplest approach is to use static references instead of opening a reference from a path.

0 Kudos
Message 7 of 8
(1,078 Views)
Solution
Accepted by topic author DBISI

I made it more complicated that it needs to be. My application works just fine if I just run the VI's inline and not use the references at all. Thanks anyway.

0 Kudos
Message 8 of 8
(998 Views)