LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read text files

Hello All,

 

I created a vi that will read text files from a specific path and display this data onto a wavechart. I was wondering is it possible to have my vi read specific lines from this text file instead of the whole text file? For example, if I wanted my vi to read only lines 27-31 from the text file and string this data onto a wavechart is it possible to do so? Thanks in advance

0 Kudos
Message 1 of 8
(1,220 Views)

@Theopolis wrote:

Hello All,

 

I created a vi that will read text files from a specific path and display this data onto a wavechart. I was wondering is it possible to have my vi read specific lines from this text file instead of the whole text file? For example, if I wanted my vi to read only lines 27-31 from the text file and string this data onto a wavechart is it possible to do so? Thanks in advance


 

Not really...

 

Just read it all into an array and use the array tools to select the lines you want from the array.

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
Message 2 of 8
(1,214 Views)
Thanks man
0 Kudos
Message 3 of 8
(1,207 Views)
Highlighted

@Theopolis wrote:
Thanks man

Thanks are given with Kudos and marking solutions.

 

Also if you want to read a file one line at a time you can right click the Read from Text File and select Read Lines.  You can read lines 23 by ignoring the first 22 lines.

Message 4 of 8
(1,179 Views)
I've gotten to that part, but then what if I don't want to read the lines after 26? What if I wanted to only read lines 23 - 26?
0 Kudos
Message 5 of 8
(1,175 Views)
0 Kudos
Message 6 of 8
(1,167 Views)

Hooovahh, no need for the loops...


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Message 7 of 8
(1,149 Views)
That possibly explains it for me.
0 Kudos
Message 8 of 8
(1,145 Views)