LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

disabling array value

Does the attachment makes sense?
 
Thanks,
Mathan
0 Kudos
Message 1 of 11
(3,732 Views)

An array element looks disabled if it does not exist in the array. You need to wire an array with a single element into a local variable of that control.

If you want to do this without code, you can right click the element and select Data Operations>>Delete Element.


___________________
Try to take over the world!
Message 2 of 11
(3,723 Views)

If you want to do this without code, you can right click the element and select Data Operations>>Delete Element.
 
Let's assume if there are some 1000 elements in the array and if last 50 values are wrongly entered, then is there any quick way to clear (make it as zero) or delete all the 50 elements.
 
Thanks,
Mathan
0 Kudos
Message 3 of 11
(3,706 Views)
Use Array Subset or Delete From Array.

___________________
Try to take over the world!
Message 4 of 11
(3,704 Views)

Great....

It works well. Thanks,,,,

Mathan

[Edited: Delete from Array is better than Array subset since array subset will give only the unwanted deleted portion of the array and didn't return the required cut-off array.]



Message Edited by mathan on 05-20-2008 06:20 AM
0 Kudos
Message 5 of 11
(3,700 Views)


mathan wrote:
...
from Array is better than Array subset since array subset will give only the unwanted deleted portion of the array and didn't return the required cut-off array.]

Hi mathan,
this is only true if you select the elements you want to delete. But you can use the Array subset if you select the part you want, index 0, length = array size - 50. Smiley Happy
 
Mike


Message Edited by MikeS81 on 05-20-2008 01:39 PM
Message 6 of 11
(3,692 Views)
Lol !!!! Smiley Very Happy
 
Mike, I didn't thought that way. Smiley Sad Superb idea. Smiley Happy Thanks,,,, Smiley Wink
 
Mathan
0 Kudos
Message 7 of 11
(3,684 Views)


mathan wrote:
Let's assume if there are some 1000 elements in the array and if last 50 values are wrongly entered, then is there any quick way to clear (make it as zero) or delete all the 50 elements.


Just curious..  How do you know which values are wrong? 
 
You may also want to visit this thread which discusses a similar topic (and provides interesting solutions):


Message Edited by JoeLabView on 05-20-2008 08:22 AM
Message 8 of 11
(3,677 Views)

That's really good link Joe. Learnt lot of informations from it. Thanks a lot.

Mathan


I can't able to solve your curiosity. Smiley Wink Actually my friend asked me for a solution for that kind of problem Smiley Surprised he faced in his programming in Visual C++. So i got curious in solving it in LabVIEW. Smiley Very Happy



Message Edited by mathan on 05-20-2008 07:32 AM
0 Kudos
Message 9 of 11
(3,666 Views)

The example from paulmw is quite efficient. 

You can easily convert the code to handle numerics instead of strings.  However, in that example he wanted to get rid of blanks, whereas in your case it would have to be a specific value..  But you can customize any of the suggestions to meet your needs.  Actually a good way to learn is to experiment with all sugegstions.  😉

0 Kudos
Message 10 of 11
(3,660 Views)