05-31-2010 01:00 PM
hi all
i want to know is there a way to use a text file and use the data in it to represent and name as the label of the indicator ?
i have attached a sample text file , what i want to achieve is that as the first row of the text file is 2 3 4 6 , its should be represented in labview and also all the indicators representing the data should have the label as the data
so when numeric indicator is displaying a value 2 it should also name the indicator 2
also the file i am attaching has only 04 columns what if the number of columns are unknown , then how can i achieve the same thing .
i hope i am clear in describing what i want to achieve
with regards
05-31-2010 01:05 PM
Hide the label on the indicator and show the caption.
Now when you read the first line of the text file, write to the Caption.Text property node for that control.
05-31-2010 01:22 PM
06-01-2010 01:34 AM
hi ravens fan
thanks for your reply , can u tell me how can i do the second part of my question if the number of element are unknow to me or are variable, as in the file i have attached has 04 elements in a row , what about i have the same file and it has 6 elements , i want to write only one program and it should be flexible enough to accomodate any number of elements in a row or column .
06-01-2010 01:43 AM
Hi nolsqn,
what about reading the file as array of strings (ReadFromSpreadsheetFile as 2D array of strings) and display the content in a table? Here you could easily use the first row of the text file for the column headers...
Otherwise it would be a much harder job to "create" new indicators depending on the number of columns...
06-01-2010 02:33 AM
Yes table is write option for it.. otherwise u can try to synchronise multicolumn listbox with array of numeric display ... in that case array size will change as per elements entry in file .. but u need to synchronise it well with multicolumn listbox ..