Jump to content

Storing files in the built application's data directory


Recommended Posts

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

Link to comment

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.

post-11742-127203781806_thumb.png

Link to comment

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.