User | Kudos |
---|---|
6 | |
6 | |
3 | |
2 | |
2 |
I have several times found myself using variants to create various types of sorted lookup tables data sets. (Variants "sort" attributes/records by the name automatically, taking a performance hit when creating/adding to the variant, but wicked fast to retrieve a named attribute, and when getting a list of all named attributes they are returned "sorted".)
Now, in many/most of those scenarios, I find myself wishing I could just name the attribute with a numeric input without the hassle of converting the numeric to a string.
For example, if you read the file-property of all files in a folder tree and put various information for each file into a cluster (e.g. size, last modified date, name etc.), this cluster would become the "attribute" or "record" that you add to a variant for quick lookup later. Now, of course you have many ways to name the attribute(s) depending on what you want to do. In one case, you may want to retrieve file attributes based on the oldest (or newest) "last modified" time.. currently one way to do this is to "format into string" the "last modified" time stamp data and use that as the attribute name. If you are careful with how you format it to string, the sorted string list will come back oldest to newest (e.g. format it as YYYYMMDDHHMMSS to get a decimal string that sorts oldest (least) to newest (latest). (Note that when getting lists of files from LabVIEW, the order of the returned files does not appear to be sorted by "modified" or "created" dates.)
It would be nice if instead the "name" input would support usage of numeric inputs directly. If this was implemented at a low enough level, then the string conversion would not only be hidden from us (users), but potentially be completely removed as I picture the "name" at a low enough level is just a unique identifier anyway.. If this could be made to allow the "name" terminal to accept time-stamp data types, strings, I/U32 and DBL I would be very happy indeed!
Please discuss in comments if this is good, bad, impossible, possible etc. etc.
Thanks,
Q
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.