LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Support files in LabView 8.0 Executables

 

I am using Lab View 8.0 to write a program and I have some suppot files such as JPG pictures, pdf files and (.wav) audio files that I use in the program.

 

For Example:

 

I have made a ‘Help’ button in the program. If the user clicks the button, in my block diagram I have the pointer/path going to C:\Program Files\SCUorderSupport\Help Pics\Pic2.jpg. I basically have set the default value of the ‘path’ to that location so everytime the user presses the help button, that picture comes up on the front panel.

 

I have similar paths for audio files (.wav) and pdf files when the user clicks certain buttons on the Front Panel.

 

I tried to generate executables of the program to provide it to the intender users. But when the user runs the program in his computer, how will the program find those support (pictures and audio files) files in his folders? The program in not responding to those buttons in the executable. 

 

Could I get some steps to do this? I have never made an executable before, so maybe I am missing something!!

 

Thanks.

0 Kudos
Message 1 of 10
(3,564 Views)

Two things:

1) yes, you can and should include the support files as part of building your executable.

2) how did you code the path?  is it hardcoded? or relative to the location of the installed executable?

R

0 Kudos
Message 2 of 10
(3,560 Views)
First, did you add those files to your project? Did you then create an installer and choose to include the files as support files?  When you create the installer, there is a Source File category. You can configure the destination view and select the folder to place your files. There is a help button at the bottom that explains more.
Message 3 of 10
(3,556 Views)

I guess I am missing something…

 

Is there any place I can find a procedure to convert my regular LabView8.0 program into an executable that also shows the steps needed to perform my previous question about the support files?

 

I might not be performing the entire process correctly, as I have never done this before.

0 Kudos
Message 4 of 10
(3,551 Views)
0 Kudos
Message 5 of 10
(3,531 Views)

I seem to have tried everything. Here is what I did:

 

1.      I created a new Project.

2.      I added the VI to it.

3.      I didn’t see any support files in the project tree, so I right clicked and added the jpg and pdf support files.

4.      I created a new application.

5.      In the Source Files, I gave it the correct startup VI, and the support pdf and jpg files.

6.      I built the application.

7.      I created an installer.

8.      In the source files, I added the application and the support files (pdf,jpg) from the tree into the destination area.

9.      I built the installer.

10.  I ran the installer in the user’s computer.

 

 

Here is the issue:

 

In my labview program I have the path for the jpg file directed to C:\Program Files\SCUorderSupport\Help Pics\Pic2.jpg in my computer. But in the user’s computer he has the Pic2.jpg file loaded in a different folder after running the installer. So when the user runs the program and presses the button on the front panel to pop up the Pic2.jpg, he gets an error since the program cannot find that path in the user’s computer.

 

Am I doing something wrong!!

0 Kudos
Message 6 of 10
(3,520 Views)
In the Destination View on the Source Files category, you can right click and add folders. For example, you could right click on [ProgramFilesFolder], add your path, then go over to the project view and click the arrow (->). I don't know how you defined the external files in the project so you might have to change this a little bit and experiment. I know that a default folder called Data is usually created as a subfolder from the exe and I usually write my apps with that in mind.
0 Kudos
Message 7 of 10
(3,515 Views)

I tried doing that... it didnt work...

When the user runs the executable on his computer, my program is looking for Pic2,jpg in C:\Program Files\SCUorderSupport\Help Pics\Pic2.jpg. But he doesnt have a folder like this in his computer. I tried changing the name of the folder in the destination area to the path name. Folder names dont take '\'. Do I need to change the path name in my program to something else? How does lab view executable open a file that is no a VI in any application, without having to load the support files in the exact same folders on the user's computer replicating my computer?

 

 

0 Kudos
Message 8 of 10
(3,512 Views)
Where did it install them? It would help to see the project and how you added the external files to it and how you setup the installer. As I said, I design my apps to use the default 'Data' folder but I think that if you add a folder to the project, it will re-create that folder (and sub-folders) when you add it to the installer.
0 Kudos
Message 9 of 10
(3,495 Views)

Thanks a ton for your help 🙂

When generating the installer, I didn’t ensure the installation was taking place in the correct destination.

 

Thanks Again!

 

0 Kudos
Message 10 of 10
(3,478 Views)