LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

file row number

Solved!
Go to solution

Hi :

 

I have txt file the include data into it

 

I want to know the number of row inside this file

 

how I can do that using labview

 

thanks alot for your help

 

I have attach file for example if  you can see the this file have 7 rows

0 Kudos
Message 1 of 3
(2,232 Views)
Solution
Accepted by Elyan_wisam

You can use the read text file primitive from file file palette, and then right clic on it to select "read rows" :

 

Clipboard01.png

 

Then it slightly changes the icon and the function :

Clipboard02.png

 

Hope this helps


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 3
(2,225 Views)

Be careful with this solution.  It can easily result in a memory issue, since you are reading the whole file.

 

If this is a problem, read the file in 65,000 character blocks and search each block for EOL (end of line) characters.  Be aware that EOL varies from platform to platform, and can be \r, \n, or \r\n.  This is usually only a problem when moving files from one OS to another.  The End of Line constant in LabVIEW gives you the proper EOL for the platform under which it is running.  If properly implemented, this method is faster than the previous one.

0 Kudos
Message 3 of 3
(2,208 Views)