10-16-2008 10:48 AM
Hi,
I am displaying a list of filesfrom a directory in a table on the front panel of a VI as part of a program I am developing. I would like the user to be able to select from that table so that particular file can be processed. Is there a way to do this?
Thanks,
Aaron
10-16-2008 11:17 AM - edited 10-16-2008 11:17 AM
you'll find that most of the useful functionality of the labview user control interface is hidden within the property node and invoke node functions. just right click a control or indicator terminal on the block diagram and mouse over to create, then to property node or invoke node. lots of fun stuff in there. attached is an example. one file is saved for labview 8.0, the other is saved for labview 8.6.
10-16-2008 01:25 PM
The example posted gives you an idea. A few points regarding the example:
10-16-2008 01:43 PM - edited 10-16-2008 01:44 PM
Thanks, smercurio. That code is much nicer. But you left that suspicious-looking unused control terminal just loitering around where it could get up to no good. I went ahead and implemented a harsh but necessary measure to make sure the situation is properly contained.
10-16-2008 01:44 PM - edited 10-16-2008 01:47 PM
Two options:
1) Easier one.
Go to function pallette:
- File I/O
- File Constants
- Path Constant
Right click on that constant, press "change to control"
Then go to your block diagram. Next to the path, there should be a small manilla folder. The user can press that and browse for whichever file they would like to process.
2) Harder one.
I would use an event.
When the mouse is clicked, it will read the value of whatever is clicked.
Kind of like the above
10-16-2008 01:49 PM
Root Canal wrote:Thanks, smercurio. That code is much nicer. But you left that suspicious-looking unused control terminal just loitering around where it could get up to no good. I went ahead and implemented a harsh but necessary measure to make sure the situation is properly contained.
Well, if you feel that strongly about it you can place the terminal in the event case and wire to the terminal instead of the NewVal node.
10-16-2008 02:11 PM
Nah, I prefer to torture the little icons.
They know what they've done.
11-07-2008 03:35 PM - edited 11-07-2008 03:35 PM