06-28-2017 03:48 PM - edited 06-28-2017 03:49 PM
Hello Labview Users,
I happen to have thousands of csv data file that I work with. The only way I recognize them is putting their characteristics in the file name. Which brings the problem of making the names too long and Microsoft doesn't like to accept long name. So I wanted to build a database for all my files. I am in the preliminary stage of building it ( I have attached the file and some of you may have seen it before).
What I want to do is, have all my files in the database with random names and list them based on their characteristics. I want to do that in my application in the place of 'file' box. So that I can click on the file and run it (double-click on the file in application to make them work in active file). based on the parameters listed on the database I want to filter them to find any specific file. How the interface of database should look like is shown blow.
It doesn't have to be a real database, just a directory application. I am trying to make it without the database toolkit. If anyone can help me out and guide me out or guide me in the right direction then that would be great. Thanks.
06-28-2017
08:19 PM
- last edited on
05-20-2025
11:25 AM
by
Content Cleaner
Hi Huqs,
Attached to this reply are 3 VIs that are a (messy) part of a project I'm working on - unfortunately for you and anyone else who looks at these, it's a part I haven't yet invested more than the minimum time into.
Although these almost certainly won't run for you, due to a large number of missing classes, libraries and VIs, opening them should give you some idea as to how I handled a similar issue. They do use a real database, accessed using James Powell's free SQLite library.
If you don't want to use a real database, perhaps you can just shorten the filenames and use a directory search, followed by parsing to expand to a multicolumn listbox?
Something like "b56v1v1w560.csv" might be enough to parse to "Bandgap:56, Voltage1: 1, Voltage2: 1, Wavelength: 560"?
06-29-2017 09:36 AM
And/or create an Index-file and with all characteristics and an ID-number, then name the files according to that file.
cbutchers idea is good, though.
/Y
06-29-2017 11:07 AM
Hi Cbutcher,
Thank you for showing me the files and suggestions. I will look more into it. However, I wasn't able to open anything you attached except the snippet. The files, when I tried to open them, it says, " File version is later than the current LabVIEW version". So I am not sure if it's something to do with my Labview 2015 version.
06-29-2017 09:03 PM - edited 06-29-2017 09:07 PM
Yes - they were saved in 2016.
Below are snippets that hopefully show the idea, but I don't know how well they'll load. The 2016 versions were copied out of the project, but these are taken from the copied out versions so a bunch of links might be broken or missing.
Immediately as I look at this I wonder what I was doing with unbundling a status value rather than just wiring the error cluster to the next case structure. Doh!
06-30-2017 03:55 AM - edited 06-30-2017 03:55 AM
You can avoid the calculation part of the time by using a Seconds to time/date and grab the parts from the resulting cluster.
/Y
06-30-2017 04:02 AM
@Yamaeda wrote:
You can avoid the calculation part of the time by using a Seconds to time/date and grab the parts from the resulting cluster.
/Y
Although I didn't previously know that Seconds to Date/Time returned a cluster (so that's interesting) I don't think that you're right about your conclusion, unless I'm misunderstanding where you mean?
Using StDT will give me hours, minutes and seconds from 9am, 1904 or something and my input is a duration in seconds. So if I have 72 as the input, hours in the cluster is 9.
Or did you mean something else?
07-03-2017 03:18 AM
Something like this should work, no?
/Y
07-03-2017 03:50 AM - edited 07-03-2017 03:50 AM
07-03-2017 03:56 AM
Ah, right! Set UTC input to true. 🙂
/Y