From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom default data directory path reverts to Labview default when executable created

I am trying to create an executable in Labview 8.0.1 from a program with the default data directory path set to a different path than the Labview default. When I compile and run the program, I find that the default data directory path has reverted to the default path rather than using my custom one. If I run the interpreted vi, it picks up the custom path.
 
Is setting a custom path in the top-level vi sufficient, or do I need to change it in other places as well?
Message 1 of 6
(4,607 Views)

I guess I must be a little confused about what you are speaking about. Could you elaborate more and possibly show some screen shots or an Example VI would be even better. What do you mean if you run the interpreted VI it works? What works? Are you trying to save to a location and it isn't working correctly? Just give a more precise explanation of what is going on. Thanks

Tyler H.

National Instruments

0 Kudos
Message 2 of 6
(4,601 Views)

From the front panel of the vi, the setting is under Tools:Options:Paths:Default Data Directory. Uncheck use default, insert different path.

Attached is the project (for the executable settings) and the demo vi. This vi just shows the current value of the default data directory.

I have changed the path of the Default data directory from the default value to a path of my own choosing. This new path is not preserved when the vi is compiled to an executable. The executable reverts to the default path instead of my specified path.

Download All
0 Kudos
Message 3 of 6
(4,598 Views)

I did see the behavior you are speaking about and will be creating a corrective action request on it. You can correct this by adding a line similar to this one to the ini file in the exe folder: DefaultDataFileLocation=C:\Documents and Settings\data

I have tested the work around and it seems to work just fine. Basically the bug is that it is not seeing this line in the LabVIEW ini file and isn't transfering it over. Hope this helps.

Tyler H.

National Instruments

0 Kudos
Message 4 of 6
(4,586 Views)

Is this going to be fixed anytime soon?  I'm still experiencing it in 8.2.1, and even though the workaround is fairly painless, it's still an annoying step to have to remember everytime I make a new build.

0 Kudos
Message 5 of 6
(4,423 Views)

FYI in case anyone stumbles across this old thread. The LabVIEW INI file pertains to configuration of the LabVIEW IDE. If you need to configure your EXE to use customizations that you've configured for your LabVIEW IDE, you need to add those same tokens to your EXE's INI file. If you want to automate this process, consider adding a post-build custom action to your EXE build spec that modifies the EXE INI file to include any token values you wish to specify.

0 Kudos
Message 6 of 6
(507 Views)