03-25-2014 11:28 AM
I have a file in .txt format coantaining sensor data arranged in columns.I want to read the file and relate column s with a tree control with colum headers as the tree entries.What I want to do is by clickingor dragging the tree entries i need to do operation in associated columsfor eg. plotting the data on waveform chart by dragging and dropping the tree element .Is it possible?If it is possible can someone guide me how to do it?
Thanks in advance..
03-25-2014 11:49 AM
To read the text file look at "Read from Spreadsheet File", which should return a 2D array of data for you.
To drag columns from the tree to a plot, for example, to display that column of data, is possible but tricky. You'd need to look into the Event Structure, specifically the Drag and Drop events, and extract the column of data for display. It might be easier to just simply click a column header to have it plotted. That still requires an event structure registered to Mouse Down and a peek at the mouse coordinates, but more easily achieved.
Take a look at the included NI Examples for these matters.