LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Write Key.vi" wont work after build

Solved!
Go to solution

I am having dificulty with the "Write Key.vi"  I am using it to save calibration values to an .ini file. This works fine when running in development mode but after I build it into a standalone exe it doesn't work. It will create the file in the correct folder but it is empty. I have no idea how to start figuing this one out. Any help would be greatly appreciated.

 

Here is the code that saves the configuration values into the .ini file. I am using LabVIEW 8.0

save calibration to ini.GIF

0 Kudos
Message 1 of 7
(3,228 Views)
Solution
Accepted by topic author DBadowski

Why Does My Executable Not Work When Using the Current VI's Path Constant? - KnowledgeBase - Support...

 

 

I will let someone else chime in here regarding all those local variables. They're out there, waiting in the bushes, ready to pounce when they see one of those little beasties. It's always hunting season for them.

Message 2 of 7
(3,223 Views)

Hi DBadowski,

Put Strip path between "Current Vi path" and "build Path" functions.

This might work. Try it and let me know.

 

Best of LuckSmiley Happy

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 3 of 7
(3,207 Views)

 


@Gak wrote:

Hi DBadowski,

Put Strip path between "Current Vi path" and "build Path" functions.

This might work. Try it and let me know.


That would work for the application, but won't when it's in the development environment. The KB article provides the proper approach.

 

0 Kudos
Message 4 of 7
(3,181 Views)

 


@smercurio_fc wrote:

Why Does My Executable Not Work When Using the Current VI's Path Constant? - KnowledgeBase - Support...

 

 


One other thing to mention is that KB is for LabVIEW 8.2.  In 2009 and 2010 a built EXE by default may have VIs referenced deeper than just one level.  You can keep stripping the path until a directory is found, or an easier solution is to check the box in the Advanced section that is "Use LabVIEW 8.x file layout" which then makes that KB valid again.

 

0 Kudos
Message 5 of 7
(3,154 Views)

I had done a quick search for problems with file acces after a build but I guess I missed that article. Thanks.

0 Kudos
Message 6 of 7
(3,139 Views)

 


@Hooovahh wrote:

 


@smercurio_fc wrote:

Why Does My Executable Not Work When Using the Current VI's Path Constant? - KnowledgeBase - Support...

 

 


One other thing to mention is that KB is for LabVIEW 8.2.  In 2009 and 2010 a built EXE by default may have VIs referenced deeper than just one level.  You can keep stripping the path until a directory is found, or an easier solution is to check the box in the Advanced section that is "Use LabVIEW 8.x file layout" which then makes that KB valid again.

 


Then you can use the alternate method which tst shows

.

 

0 Kudos
Message 7 of 7
(3,131 Views)