LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to determine the lines in a file?

altenbach,

You are quite right about the extra memory allocation. To be honest, I wasn't thinking about that as I forgot about the fact that he initially said the file may contain up to 120000 lines. To be honest, nowadays I forget a lot of things...Smiley Wink

As for using the Split Array: just habit, nothing else. Sometimes you just get used to doing things one way, and like I said I wasn't paying attention to the size of the array.

As for using the Convert to Array and Unbundle: Yes, I'm aware of the resize capability of the Index Array. Again, this is just habit - nothing more. Besides, I was actually tying to get him to use the "Scan From String" function as that is clearly the better solution, wouldn't you agree?
0 Kudos
Message 21 of 24
(758 Views)
I did not use Scan from string because I will get this error:
 
Error 85 occurred at Scan From String (arg 3) in Graph sensors 2.0.vi
 
Not sure why.
 
I have to try to use my file becuase I might have performance issues.
 
I will test and let you know.
 
Thanks
 
0 Kudos
Message 22 of 24
(749 Views)
Error 85 can be caused if the format string you're providing the function doesn't match the expected format of the line it's trying to scan. The VI I provided worked just fine for the two sample files you gave, which probably means that the file you're trying to scan has a different format. You should take a look at your file.
0 Kudos
Message 23 of 24
(735 Views)
Solved the problem.
Thanks guys.
 
I used scan from string.
0 Kudos
Message 24 of 24
(722 Views)