LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Delete from multiple rows elements from Array

  Hi everyone,

 

i have one question:" how can i delete just one column from my table?"

 

 Thank you for your help in advance,

   BC2010

0 Kudos
Message 1 of 8
(3,757 Views)

moreover i don´t know how to change table indicator to table control during programm run???

0 Kudos
Message 2 of 8
(3,755 Views)

You are replying to a 12 YEAR OLD THREAD.  Post a new thread, with your new questions.

0 Kudos
Message 3 of 8
(3,737 Views)

Instead of attaching a gigantic diagram picture with lots of hidden or questionable code, attach a simplified version of the problem as a VI. Reduce it to the exact problem you are having (i.e. a table and the data leading to it and the desired outcome of the operation).

 

A table is just a 2D array of strings, so deleting a column of the 2D array is sufficient, but you might have to re-write the column headers too.

 

You cannot change between control (a data source) and an indicator (a data sink!) at run time, You can make it a control and disable it so it cannot be operated if it should act as an indicator only. You can write to a control using a local variable, but often there are better ways.

0 Kudos
Message 4 of 8
(3,725 Views)

  Hi Altenbach,

yes, you´re right, i also want to re-write the deleted columns. Is there some tricks i can use?

 

   Thanks a lot,

    BC2010

0 Kudos
Message 5 of 8
(3,684 Views)

No tricks needed. To replace the values in a certain column with new values, use "replace array subset".

Message 6 of 8
(3,670 Views)

   Hi,

that means i have to combine while-loop for writing values into table an while-loop for deleting column of values? and use replace array subset??

  Thanks a lot

0 Kudos
Message 7 of 8
(3,649 Views)

BC2010 wrote:

that means i have to combine while-loop for writing values into table an while-loop for deleting column of values? and use replace array subset??


That really depends on what you want to do. I cannot conclude these points from the original question.

 

Typically you would keep a 2D array of string values in a shift register and manipulate the values as needed. You really need to be significantly more specific. For example, you cannot delete individual elements, but you can replace individual elements with empty strings and later replace them again with formatted values. You can do that with entire rows or columns while keeping the table size constant. OTOH, you can also delete or insert  entire rows or columns, shrinking or growing the array accordingly. Update the table indicator whenever the data changes.

0 Kudos
Message 8 of 8
(3,622 Views)