08-11-2023 03:30 PM
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.
Solved! Go to Solution.
08-11-2023 03:39 PM
In your filepath, you have a filename with an exclamation point in it. I think that is an error.
08-11-2023 03:41 PM - edited 08-11-2023 03:42 PM
That's just dummy text. Not the actually file name I am using. I am using a normal file name.
08-11-2023 04:37 PM
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.
08-11-2023 05:17 PM
@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.
08-11-2023 08:09 PM
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.
08-11-2023 09:12 PM
@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.
08-14-2023 07:52 AM
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.