LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string to array of strings to path

Solved!
Go to solution

Hello,

 

I want to read in a bunch of paths in the form of a long string such as:

 

C:\Files1;C:\Files2;C:\Files3....

 

such that when i enter it into labview it will seperate that string at the (;), store it in an array of strings, and then allow me to pass it into a while loop. Which vi can best accoplish this?

 

Thanks

0 Kudos
Message 1 of 6
(3,228 Views)

I'd use the Match Pattern vi in the Strings Palette.  It allows you to search for a character and then gives you the string before and after the match.

 

I attatched a vi that you should be able to tweak to get it to do exactly what you want.

 

Enjoy!

 

~Rob Afton

Download All
0 Kudos
Message 2 of 6
(3,226 Views)
Solution
Accepted by topic author Chris_H

Or just use the spreadsheet string to array function.

 

String to array.png

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Message 3 of 6
(3,218 Views)

LV_Pro

 

It will not let me create that string array constant. it only lets me use numeric types. how did you get that string constant?

0 Kudos
Message 4 of 6
(3,214 Views)

nevermind i got it

0 Kudos
Message 5 of 6
(3,212 Views)

Also make sure to change the delimiter to ";"

0 Kudos
Message 6 of 6
(3,205 Views)