LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

chosing lines with condition from .txt file

Solved!
Go to solution

Hi Guys ,

actually i am new with labview and have to do a project for education , so i have problem now that is i cant find a solltion for select a line in a file and put in table and go to another file and do the same thing until i finish the folder and in each file i just have to find one line 

0 Kudos
Message 1 of 7
(1,589 Views)

You can use List Folder to get the list of files in a folder.  You can then use a FOR loop to process each file.  After that, we need some more details.  What is the format of the files?  How do you find the line you care about?  What is this table you are putting data into?

 

But, more importantly, what have you tried so far?  We are not here to do your work for you.  You have to at least show that you are trying.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 7
(1,587 Views)

2dom_0-1629297030538.png

2dom_1-1629297050238.png

i want to select the line that have |M| and not the first one and extract it into an araay or table or any thing the user can see it clearly 

0 Kudos
Message 3 of 7
(1,583 Views)

I forget somthing i just want the first one which have |M| the others dosen't matter  and the first line is not included 

0 Kudos
Message 4 of 7
(1,579 Views)

For Regular Expressions, '|' is a special character (acts as an OR).  So instead of Match Regular Expression, use Match Pattern.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 7
(1,560 Views)

Actually i dont know if my code gonna give me the result i want .

0 Kudos
Message 6 of 7
(1,524 Views)
Solution
Accepted by topic author 2dom

@2dom wrote:

Actually i dont know if my code gonna give me the result i want .


You're pretty close. I'd use Read text file with Read Lines-setting (r-click icon to set it) to get all rows as an array, that makes it easy to use a For loop instead. Then use Match Pattern as mentioned and you should be home free.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 7 of 7
(1,521 Views)