LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

programmatically change control values

Hi all,

 

I wish to put a control on a front panel to select a certain text string, (which will then open a look up table, choose starting parameters etc). I will want to add other items to this control at a later date when further selections are required. I am thinking of putting my selections in a text file and then I can update that file as I wish in the future. The ring menu/text menu then can be generated from this text file and point to the correct LUTs etc. Is this feasible? Or really simple?!

 

Any suggestions welcome.

0 Kudos
Message 1 of 6
(6,623 Views)

Hello,

 

I had problems doing this with Enum/Ring, don't know if it changed in new versions.

 

It works with a listbox (front panel -> modern -> List table, tree -> Listbox)

I can give you the number of actual, clicked or douleclicked row to your program.

You can modify the contents of the complete table manually 

or programmatically with a property node: Itemnames -> change to write

 

Succes

Message Edited by ST5 on 04-19-2010 06:02 AM
0 Kudos
Message 2 of 6
(6,618 Views)

Assuming that you will process the "string" displayed in the "list box" or the  "ring" properly ,it would be really simple as well feasible

 

You can create a text file with the proper delimeter (like tab or new line) and read this file and populate the same to the control you wish to using a local variable or a property node during the start of your program.

 

 

Guru

Regards
Guru (CLA)
0 Kudos
Message 3 of 6
(6,603 Views)

Hi guys,

 

thanks for the help. Have it sorted. Created an array of strings from my text file. Placed a ring control on the front panel, and using the property node element strings[] for the ring control I managed to input the strings into the ring control.

 

Cheers,

 

Leeser

0 Kudos
Message 4 of 6
(6,579 Views)

Leeser wrote:

Created an array of strings from my text file.


 

 
 You can probably replace your while loop with a simple "read from Spreadsheet file" with "end of line" (or whaterver you actually have) as delimiter.
 
(What exactly is the line delimiter in your file? CR is unusual. Typical is is either CRLF or LF).
 
 
 
Message Edited by altenbach on 04-19-2010 07:59 AM
0 Kudos
Message 5 of 6
(6,565 Views)

read from spreadsheet file is probably easier alright. I was emailed a txt file from a colleague who wanted to carry out this task so used his file format...

cheers

0 Kudos
Message 6 of 6
(6,558 Views)