02-04-2010 12:42 PM
Hi all,
I have a case structre in a for loop. The loop will loop for 50 times. I place some code in the case structre for when i = 1, 10, and 15. When i is equal to other values, I want a default case. How do I do that? I don't have to create cases that include all the possibilities, do I?
Also, is there a way to programmatically create conditions in case structure?
02-04-2010 12:51 PM
The other case is simply 'Default'
As to part two of your question, do mean generate the case structure programmatically as in scripting?
02-04-2010 03:39 PM
Are you saying that I can just create a case called "default" with no number associate with it?
Yes, I want to create the condition with the user specifying the condition.
02-04-2010 03:44 PM
jyang72211 wrote:Are you saying that I can just create a case called "default" with no number associate with it?
You can right-click on any case and select "Make this the default case" (or some such words like that). This is explained in the LabVIEW Help.
Yes, I want to create the condition with the user specifying the condition.
You cannot create cases at runtime. The scripting method allows you to programmatically create a case structure from some source, like a list of strings. But this is an edit-time operation. You will need to design your code to handle a user-specified condition. Can you provide more details on what this condition is?
02-04-2010 04:00 PM
jyang72211 wrote:
Yes, I want to create the condition with the user specifying the condition.
Am I the only one with Kenny Rogers and the First Edition stuck in my head...And feeling a strange urge to go Bowling?
If you provide details on the condition I can tell you what condition your condition is in...
02-05-2010 02:59 PM
02-08-2010 01:23 PM
Thank you all. Your information helps a lot.
Yik