LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Peter_FitzGerald

Connect Array directly to Case Selector

Status: Declined

Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined. 

If you connect an array to a case selector the case statement should automatically create the two cases "Array Empty" and "Array Not Empty"

4 Comments
AristosQueue (NI)
NI Employee (retired)

What if it were just a selection on array size, so you could have (for example) "0", "1..10", and Default ?

X.
Trusted Enthusiast
Trusted Enthusiast

I don't understand the purpose of this idea. AFAIK, you can't connect an array to a case structure case selector, therefore THAT would be a prerequisite. Since arrays can have any number of elements (and types), I can't fathom how the case description would read.

But if you are interested in only the array size, you are pushing it a bit, aren't you?

How difficult is it to do this:

 

ScreenHunter_003.jpg

Darin.K
Trusted Enthusiast

For the purpose of the OP (empty/not empty) you can even bag the Array Size function:

 

EmptyArray.png

 

This will work for >1D arrays as well.

 

I am pretty certain I would not automatically associate the array size with the values I was seeing in the selector label if the array was wired straight in.

Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.