01-05-2022 04:55 AM
Hello every one,
i developed a code that calculate servings of food , to achieve calculation must be the base values stored in a txt file. i have been trying to build an exe application using labview 2020, the code and application was built an went well on my PC, but when it installed on client PC somthing went wrong, it seems like the application can not read data from txt file or the file wasn't included in the application program.
i have the main vi and 3 sub vis included inside the main vi notice that the txt path coded in serving_calc_with_grams.vi . the txt file and subvis is located in other folder. in other words the sub vis and txt file located in certain folder and main vi located in other folder.
i tried to locate the txt file with same folder but the problem still exists.
i read the help and serched in ni site to solve this problem but i didn't find the solution.
could you help me for this?
Solved! Go to Solution.
01-05-2022 05:21 AM
Hi 2WP,
@ANAS_ALHRAINE wrote:
i tried to locate the txt file with same folder but the problem still exists.
i read the help and serched in ni site to solve this problem but i didn't find the solution.
could you help me for this?
So there is a problem with your code but all we get is an image of the project explorer window???
What's the filepath you try to access?
How do you access the file?
There is no text file in your project: do you need to deploy that file to the other computer?
01-05-2022 05:29 AM
i put the subvis and main vi "untitled" to see, the problem is the file can not deploy on other PC so , the application can not read the data that stored in it
01-05-2022 09:33 AM - edited 01-05-2022 09:33 AM
@ANAS_ALHRAINE wrote:
i put the subvis and main vi "untitled" to see, the problem is the file can not deploy on other PC so , the application can not read the data that stored in it
So you are saying the text file does not get deployed with the program?
Did you include the text file in your Build Specification as "Always Include"?
The header files shown are automatically included in a subdirectory of the program itself.
01-05-2022 09:39 AM
Is the application installed on the other machine or are you just copying the exe?
Are you sure the application has permission to access that file location?
Do you get any error codes?
Overall, the code is quite fragile and has many questionable constructs:
01-06-2022 08:47 AM
I built the reference indicator on subvi to see where the path going, and then, correct the path of file where it located in same way that you have explained.
01-06-2022 09:30 AM
thank you for the notes you mention, i'll get it and edit my application.
the problem solved . the wrong path make it,