MartinMcD Posted April 23, 2010 Report Share Posted April 23, 2010 Hello there, I'm trying to find the way to save a file into the 'data' directory that gets created next to the myApp.exe built application file. Please can anyone help? If I use Current Vi Path->Strip Path->Build path data then this works in development mode but not in run time mode. Also, I noticed that within the data directory of my built application a dozen folders with my class names have been created with thi vis inside. Is this normal? It is the first class-based app I have built. It seems strange to build a standalone app and then have to send out a folder with loads of vis in it. Thank you for the help, Martin Quote Link to comment
crossrulz Posted April 23, 2010 Report Share Posted April 23, 2010 Check out this thread. There was plenty of different ways to do this. Your main problem is that the EXE is part of the directory structure. Quote Link to comment
MartinMcD Posted April 23, 2010 Author Report Share Posted April 23, 2010 Thanks for the reply but the link seems to have been missed off. Please could you post it again? Quote Link to comment
mje Posted April 23, 2010 Report Share Posted April 23, 2010 It's pretty easy to include any arbitrary file into a build...once you've deciphered the arcane method to do so. First thing you need to do is add the respective files to your project (even if they're completely unrelated to LabVIEW, such as text files, jpegs, whatever). Then head over to the Source Files category. Here you can click on any item in your project, and force it to be included if you pop it into the Always Included box. Then, in your build specification, you need to check out the Destinations category. If you just want to use the Data directory (which by default is called the Support Directory), that's fine, nothing else to do. But you can just as easily add other destinations, such as documentation, library directories, etc. Each Item you have under the Destinations box will be available for you to select as a destination in the next step. Once this is done, head over to the Source File Settings category. Click the item in the project hierarchy you're interested in, and verify the Inclusion Type that you've declared previously (I know...it would be way easier to be able to set it directly here). Below that box is a combo-box that will allow you to set where the item goes, each item in the box will have been defined earlier when you were verifying the Destinations settings. Clear as mud I hope? NI made the process way more complicated than it has to be in my opinion. Quote Link to comment
crossrulz Posted April 23, 2010 Report Share Posted April 23, 2010 Thanks for the reply but the link seems to have been missed off. Please could you post it again? I could have sworn the link worked before I posted it. Oh well. http://lavag.org/top...directory-path/ Quote Link to comment
bmoyer Posted April 23, 2010 Report Share Posted April 23, 2010 As for the class files in the data directory, this is an unfortunate "feature" with classes in 8.6. I did not like this at all with LabVIEW 8.6.x and avoided 8.6 for this reason as well as others (I went directly from 8.5 to 2009 with my real code development). This seems to be fixed in LV2009. Bruce Quote Link to comment
MartinMcD Posted April 25, 2010 Author Report Share Posted April 25, 2010 Great, thank you all for the help with this, 'tis much appreciated. Martin Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.