06-13-2013 07:01 AM
I want to build a vi such that it writes two arrays "range" and "height" to a text file. I should be able to enter the inputs in these arrays one by one and write them to a text file. And later I should be able to read the inputs from this files and load them into the arrays "range" and "height".
06-13-2013 07:04 AM - edited 06-13-2013 07:08 AM
Hi,
"Write to Spreadsheet File" and "Read from Spreadsheet File" will be your friends here. They are located in Programming>>File I/O.
-CC
06-13-2013 09:23 AM - edited 06-13-2013 09:33 AM
@Dhiraj072 wrote:
I want to build a vi such that it writes two arrays "range" and "height" to a text file. I should be able to enter the inputs in these arrays one by one and write them to a text file. And later I should be able to read the inputs from this files and load them into the arrays "range" and "height".
06-13-2013 10:44 AM - edited 06-13-2013 10:46 AM
here's the vi
note: i notice i am not able to upload a vi...notified moderator
06-13-2013 10:52 AM
To get the separate arrays back from your file, use the Read from spreadsheet VI and then "Index Array" to get the two separate columns.
-CC
06-14-2013 03:15 AM
Thanx a lot.
06-14-2013 03:52 AM
How can I add two controls(string or numeric) one for "range" and one for "height" such that I need to enter N no. of values one by one which then get stored into the arrays "range" and "height" which are then wrote into the the text file.
06-14-2013 05:16 AM - edited 06-14-2013 05:20 AM
I would use an event structure to control when you insert your values into the array.
I've attached an example of this, and this'll populate your array with range and heights. You can then write the array to your text file as Apok showed you.
If you wanted to see the array populate as you pressed the button you could move the array indicator inside the event structure.
-CC