LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

case select

I have a table control with header strings populated.

I would like to have switch case for the each row header string automatically.

because the table has 50 rows it is difficult for me to edit the switch case manually.

(Inside the each case the string need to be populated.)

i may insert or deleted the header string while developing the vi.

It is fine to have the empty case for the inserted string but the value of string to be in the switch case.

 

How to do this?

0 Kudos
Message 1 of 8
(2,917 Views)

Hi,

Please provide any alternate way if it can be done to handle list of strings.

Thanks for the help

Thanks

Kalyan

0 Kudos
Message 2 of 8
(2,900 Views)

I'd create a Type def'd Enum of the column names, then you can extract the strings from that to populate the first row of the table and connect it to a case structure and select "Add case for all values".

 

To create the Type def Enum a little easier you can create a ring control which can be populated by the existing column names, then replace it by a Enum and it'll keep the list.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 8
(2,890 Views)

Hi,

   I am not able to get this point.

Do you have sample test vi for this?.

Thanks for the help.

Thanks

Kalyan

 

0 Kudos
Message 4 of 8
(2,885 Views)

Hi,

 

You can use VI Scripting to generate the different cases. But I would better use a Type Definition as said Yameada, this will improve the reusability and scalability of your application.

 

extrait.png

 

Regards,

Da Helmut
Voir le profil de Maxime M. sur LinkedIn - View Maxime M.'s profile on LinkedIn
0 Kudos
Message 5 of 8
(2,862 Views)

Please send the file in 2009 format. Thanks for the help.

0 Kudos
Message 6 of 8
(2,857 Views)

Hi,

 

Here is the 2009 file.

 

Regards,

Da Helmut
Voir le profil de Maxime M. sur LinkedIn - View Maxime M.'s profile on LinkedIn
0 Kudos
Message 7 of 8
(2,853 Views)

It's hard to post a VI of a process ... but this might be some help.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 8
(2,843 Views)