From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I cleanly remove to objects from an array

Solved!
Go to solution

I created an array of addresses.  Then I needed to remove two of them.  The last two cells were still active. 

After I found the problem I created a second array to replace the first one.

I would like to know the proper way to remove the two cells in the future.

The first array has three empty cells at the bottom the first tow are still active. (slightly darker pink)

The second array has three empty cells but are not active.

0 Kudos
Message 1 of 4
(2,243 Views)
Solution
Accepted by topic author RedneckNerd

Right click on Array-Element -> Data Operations -> Delete Element:

grafik.png

 

Regards, Jens

Kudos are welcome...
Message 2 of 4
(2,236 Views)

Programatically?

 

Delete from array will default to removing the last element

 

Interactively, right click what you do not want and select data operations >>> Delete element.

 

It is possible to interactive delete more than one element but you must first select the fisrt and last and then choose delete.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 4
(2,233 Views)

I was looking for interactively.  I know the delete from array function.

I just needed to edit my code. Not alter data in my program.

 

I am using a Labjack T7 and am exploring the different ways it likes to be configured.

I tried something that didn't work and was undoing it in the wrong way. 

I just deleted the elements with the key board and not the appropriate way with data operations.

When I found the error of my ways, I wanted to learn the proper way of doing that, and not have to rebuild the array in the future.

 

Thank you both for the quick and concise answers.

0 Kudos
Message 4 of 4
(2,228 Views)