12-02-2021 03:59 PM
Hello,
I apologize for the "list" method of explaining the issue.
I have a main .vi that will be built into an .EXE application for distribution (taking to other computer only running LV RTE).
Within this main .vi are 18 other .vi files each with their own front panel user interface and data input/output which is passed back to the main .vi.
These various vis are opened as a "Open VI Reference" with a file path and display their respective front panels within a subpanel on the main vi for the user to enter data before it is passed back to the main vi.
The file paths are read in from a .txt file (filepaths.txt) as soon as the main vi starts as to easily change file paths to match another computer system. The file path to the .txt is set by the user in the main vi upon startup.
When I execute the .exe of the main vi on my development system, everything runs fine, but when transferring over to the other computer system, the references don't appear to be loading into the the main exe.
All the 18 additional vi files have been built with the application as an "always include" as well as copied to the secondary system to the respective folder which the filepaths.txt points to.
My questions: Has anyone done this effectively? Is there a better method for implementing this sort of interface? Is this an issue with LV RTE?
Currently using LV 2020 Professional and the other system has both RTE 2020 and RTE 2020 SP1.
Solved! Go to Solution.
12-08-2021 01:06 AM
@Matthias9265 wrote:
The file paths are read in from a .txt file ... to easily change file paths to match another computer system.
While this isn't your actual problem, I would expect that not doing this would help solve your problem. What you probably want to do is use relative paths rather than absolute paths. This should allow you to use the same code on multiple computers even if it's located in different places, as long as the relative locations are the same.
As for what your actual problem is, you didn't include enough details, but here are some relevant points:
You didn't give any details about why you think you need to have different locations for different computers, so I can't comment on that, but I'm going to assume you don't actually need what you're doing and that you can actually simply have all of the VIs inside the EXE (mainly because that's what most people need).
For something like that, I would suggest that you try using static VI references which will always point to the correct VIs. Depending on your usage, you can either use that reference directly and run the VI as a regular VI, or you can use the reference to get the VI name/path and feed that into the open function.
12-08-2021 03:36 AM
You need not only the EXE, but an installer. Create an installer from the EXE and it will automatically populate for you with most of the default options that it finds the EXE should need to run. LabVIEW exes don't run with the all the correct RTE components and the safest way to ensure these are included is to generate the installer yourself. I suspect you've missed something basic from the RTE installation on the other PC.
James