LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot add elements to Delete From Array

I just observed a strange thing with the "Delete From Array" vi.   I cannot stretch it to add more indexes, as shown in the Context Help. See attached image.
This is using LV7.1.
 
The reason for doing this is part of code cleaning, where I wanted to remove the last (1-D) elements stored in a 2-D array.    This is to remove qty:11 "Delete From Array" vi's.   There's probably better ways..
 
However, this thread is simply to address why additional indexes cannot be inserted as shown in the Context Help.
 
RayR
 
 
Message 1 of 9
(3,896 Views)
Hi,

I can confirm this for LV6.1 and LV8.20 (for 1d and 2d, length-parameter wired or not...)!

Message Edited by GerdW on 02-05-2007 04:10 PM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 9
(3,889 Views)

In my opinion, this is simply a small bug in the documentation and you should not be able to change the size of the function.
Think about the following case: You tell it to delete row #2 and row #4. Is row #4 the original #4 or #4 after you've deleted #2 (i.e. what was originally #5)? To avoid having to deal with this, you simply can not delete at more than one index and the documentation itself doesn't even hint that you can. The "index n-1" part actually refers to the number of dimensions that the array has.

Basically, that resizing arrow should simply not be there.


___________________
Try to take over the world!
Message 3 of 9
(3,883 Views)

Hi tst,

Yes, your explanationmakes sense.  This is why I posted this example and pointed to the info in the Context Help. 

I was surprised not being able to do it.  I was more curious at how it could be done!! 😮  Thanks.. 

Now, should this be reported as a documentation bug?

RayR

0 Kudos
Message 4 of 9
(3,859 Views)


@JoeLabView wrote:

Now, should this be reported as a documentation bug?


Thinking about this some more, I'm not entirely sure it is a bug, since the function does resize, simply without your control.
Personally I think that arrow suggests that the user can resize it which is why I would say that arrow should not be there.

___________________
Try to take over the world!
0 Kudos
Message 5 of 9
(3,855 Views)
As for how to remove the extra nodes, I would suggest using a for loop with a shift register. Just be sure to sort the array of indexes to delete in descending order so that you start deleting rows from the end.

___________________
Try to take over the world!
Message 6 of 9
(3,855 Views)

Yes, this is what I ended up doing.  Especially since time is of essence.

However, I do want to play with the power of vi's with arrays, in ways to avoid using loops.  (a nugget in the making) 🙂

0 Kudos
Message 7 of 9
(3,836 Views)
Hi all,

This was reported to R&D (4147LH3A) for further investigation. R&D is currently investigating this issue. We appreciate your feedback!

Best regards,

Steven
Message 8 of 9
(3,803 Views)
Thanks Steven
0 Kudos
Message 9 of 9
(3,772 Views)