LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Strings, html bulider, formula node, how to parse and output file names?

Hi all,
 
Labview module/vi's running tests.  There are 15 test categories and each category as 5 to 25 sub tests.  In the vi, I have a test category name string and its numeric index for the test number (sub test).
 
The output is going to be ON an html page, the info I want to create is a hotlinked file with the anchor tags, so the browser will open up the file if clicked on.  So the test output will have the test name and a link to a text or rtf file.
 
Now if LabView allowed string processing in the formula node? it would be simple.  But with 1980s C language primitives limited to math functions, the vi has to be cluttered up with a full page of Index Array items, with string constants wired up for the 5 to 25 sub test entries, and some way to compare strings to the main test name/category.  It can be done but if there is a better way? Id like to know
 
And maybe the hotlink name will change, it has to be updateable.  So what would be nice is to have a spreadsheet or comma separated value page to:
 
Test Category string -->
Sub Test index number -->               
Resulting text to be displayed with html anchor tags?  
 
Then the process can take the string literal and the index and output some other text, which turns out to be the file names.  And somehow it gets added into html builder so it shows up in blue with an underline so the browser opens up the file when clicked.
 
I could probably hard wire up everything with the string literal names and test index number with comares, array indexing, array builder, but then its NOT going to be editable by a regular user, what if the file is going to be changed later? 
 
But I cannot figure out how to take a comma separated value table and use that to format how it parses the original inputs, the main test name in string format, and the numeric index of the sub test. 
 
It would be nice to use VB.net string features and use a Switch/case function, but any suggestions are appreciated.  thanks
 
0 Kudos
Message 1 of 3
(2,390 Views)

Hello,

I don't think I understand exactly what you are trying to achieve.  If you can boil down your question to LabVIEW specific functionality, I may be able to guide you to a solution.  For example, you said:

"But I cannot figure out how to take a comma separated value table and use that to format how it parses the original inputs, the main test name in string format, and the numeric index of the sub test." 

Can you describe what you like to do here in terms such as "I have a string with names in it delimited by commas, and I would like to create an array of those names."  If you can be more specific about the precise operations you are having trouble with, I'll try to give you guidance on how to build this in LabVIEW.
 
Regards,
AG
0 Kudos
Message 2 of 3
(2,370 Views)
I think what you want is to read your CSV file into a 2D array of strings. Then, you split 2D array into single arrays column-wise using the index array function. To get a specific association between a test name and the file name you use Search 1D Array to generate an index. Since the other columns have the same index relation to the 'names' column you use that to index the other information.
0 Kudos
Message 3 of 3
(2,368 Views)