04-20-2017 05:43 PM
Hi Nathand,
Can you tell me if I've implemented all of your suggestions?
Thanks.
04-20-2017 06:35 PM
Looks like you're most of the way there, but there's still a number of instances of having one array dimension too many. For example, if you leave the number of lines input unwired to Read from Text File, then it reads one line as a string instead of an array. If you wire a 1D array to Spreadsheet String to Array, then you get a 1D array out - no need to index out one dimension! Same thing again with Delete From Array - leave the size unwired, you get a single scalar element. For the First Line case - use a simple bundle, not an in-place element structure, because you're ignoring the existing data and replacing all of it. Another easy simplification is to remove the shift register labeled Line Count, since it's a duplicate of the iteration terminal - and you can wire the iteration terminal directly to the case structure selector, with cases for "0" and "Default" instead of True and False. Here's just the one VI with all that cleanup, saved in LabVIEW 2013
It still doesn't deal with the big issue of unnecessarily reading the entire file twice, but that's more a problem for the original poster to resolve.