LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How Do I Make the Destination Directory a Relative Path?

I work on numerous different sets of source code, which are often moved around - between the main development station, the field laptop, the simulator test station, and other locations. Also, we practice a rather heavy-handed form of revision control, where-in the entire source code folder is copied and given a new revision number with each successful new executable. As a result, I virtually never use the same source code to create an executable in the exact same location more than once. However, all source code is ALWAYS kept in x/Source_Code_Name, created executables are ALWAYS created in X/Source_Code_Name/build, and the support directory is ALWAYS x/Source_Code_Name/build/data.

 

In older versions of LabVIEW (don't know when this changed exactly), there were no problems with this method - the destination directory always chanced to match the new name - it was always a relative path based on the location of the project file or build file. However, with LabVIEW 2011, this has changed to an absolute path, meaning I have to remember to update the destination directory EVERY SINGLE TIME, otherwise the new load will be saved in the old (and now wrong) location.

 

I want to go back to how it used to work, where the destination directory is automatically changed to keep things pointing at "C:/[wherever the source code currently is]/build". How do I do this?

0 Kudos
Message 1 of 2
(3,242 Views)

Hello BobChuck,

 

As far as I know, the only way to preserve relative destinations across project revisions is to designate a "parallel" build location in the original build specification for the executable (i.e. project file, exe, and support files all located in the same directory.)  With this configuration, I believe that any new builds will default to the same directory that the project is saved in. Any sort of nested structure will result in an absolute build path, as you mentioned, and I don't believe that there is any way to change this in the most recent version of LabVIEW.  From what I understand, this has been done to prevent issues that can occur when moving source distributions between drives or systems with dissimilar directory hierarchies. 

 

This particular issue has come up before, however, and there is currently a LabVIEW idea exchange suggestion page located here, which you are welcome to add to. 

Tom L.
0 Kudos
Message 2 of 2
(3,202 Views)