02-20-2020 08:25 AM
I was able to open a new window VI using the VI reference. The problem is when I build an executable I have the error: "LabVIEW: (Hex 0x5A5) Open VI Reference no longer matches VIs in memory by filename. A filename is no longer sufficient because the full name of a VI now includes any owning libraries." If I run directly from Labview, it runs okay.
I am building a path using the application directory with a build path, and as I mentioned if I run from Labview it runs okay, but if the executable gives that error mentioned.
I am sending data to the new VI using the VI Invoke Node, with the set Value. Is another better way to perform this task?
Solved! Go to Solution.
02-20-2020 09:06 AM
If the VI you're trying to open with a reference is compiled into the .exe, then the path to it will include the .exe name as a path element.
e.g: "C:\My App Folder\My App.exe\My Module.vi".
You can use this to determine whether you are running from the dev environment or from the compiled app; then construct the path appropriately.
As an alternative, load the VI dynamically.
02-20-2020 09:10 AM
Place an indicator on the screen of the filename that you are sending to open the vi reference and then rebuild your executable. I believe that this will give you a clue as to what the problem is.
02-20-2020 09:15 AM
@paul_cardinale wrote:
You can use this to determine whether you are running from the dev environment or from the compiled app; then construct the path appropriately.
Use the Diagram Disable Structure instead. You can use the RunTime Engine == True case for when you are running in an executable and the Default case for running in the IDE.
02-20-2020 09:24 AM
I suggest using static VI reference.
Static VI References will also include the VI in the build automatically. When a ref is opened by name or path, you have take care of that.
Even if you have to open a reference (to create a clone), I use a Static VI Reference, and then get the name or path from it to open the reference. The VI is always included, the name will always be in memory.
02-21-2020 06:44 AM
I will do what in order to check what is happening. Thank you
02-21-2020 06:46 AM
Thank you. I will try to figure out how to work with this property.
02-24-2020 06:36 AM
I am new at Labview, sorry...
This feature is very nice. But I think I might find my problem. I am trying to check if the new VI is opened in a new window, so I use something like the attached files.
When I am running under Labview, I get from "idle" to "tun top level". When I am using the executable i always get "bad".
02-24-2020 06:48 AM
So if I use something like this:
I can get access to the new VI, and don't get errors with the paths.
I will try to use this, approach. thank you
02-24-2020 10:26 AM
Using Static VI Reference solvess my problem. However, if I press the button to stop the app (the typical one), when I push-it it will stop the app, but the next time that I start running the program I cheking for the "VI > Exec.State" and get "Run top level". If I close the labview and perform everything by hand I get "idle". So my question is, how I can stop the new VI to be loading or something like that?