LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

BMP file not building in executable

Solved!
Go to solution
Hello,
I have created an executable for my projet that contains a BMP file.
The problem is when i run it on the development system,it works normally but when i transfer it to another PC without installing labview, it works anymore(the BMP file is not appearing) . 
I have looked at many tutorial but this still not work.
Someone have idea how to solve this problem? 
Thanks.
0 Kudos
Message 1 of 6
(3,119 Views)

how are you specifying the path to the BMP file?  Are you using "This VI" as your base path?  If so, try using "This Application"

Capture.PNG

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 6
(3,107 Views)

Hello aputman ,

Thank you for your reply,i tried to use current Application but i got an error.

please find attached snapshot of the error and the pathused to imprort bmp file .

Download All
0 Kudos
Message 3 of 6
(3,041 Views)
Solution
Accepted by topic author merie15

The problem with using absolute paths is that they are never the same from one PC to the next unless you purposefully recreate the path.  In your case, you have the BMP stored on the desktop and the path to the desktop from one PC to the next is most likely not the same (depending on the user name and the OS that is used).  It would be better for you to use a VI like the one below (Get System Directory....found in the File Constants menu) that returns a system path to the desktop and build your path from there.  

 

Capture.PNG

 

 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
Message 4 of 6
(2,919 Views)

FYI, I wouldn't suggest storing your BMP on the desktop.  The desktop is, to the dismay of disorganized people, not made for storing files.  If you are building an EXE, create a directory for the the exe to reside in (preferably in the Program Files directory) and keep all of your BMP, INI type files in there.  This will hopefully prevent them from being accidentally deleted.  Then you can use the Application Directory VI as your building block for your path.  

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 5 of 6
(2,915 Views)

Thank you aputman,

it works perfectly now.

0 Kudos
Message 6 of 6
(2,884 Views)