LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Search 2D Array and Change Background of Cells depending on 1D Array Input

Hello LabVIEW-Community,

 

depending on the 1D Array Input the program should search the 2D Array

and change the cell background color. For instance if the 1D Array are the number 1 and 16

the first and the last element of the first column should be highlight.

Any suggestions?

 

Best regards,

MarcLee

 

 

0 Kudos
Message 1 of 6
(2,635 Views)

Read this other post from today that tells you why you can't do that, but gives you work-arounds for it.

 

https://forums.ni.com/t5/LabVIEW/How-to-highlight-elements-of-a-large-2D-array/m-p/3874754#M1098187

 

However, looking at your VI, you don't have a normal 2-D array.  You have a string table which is a more advanced version of a 2-D string array which provides properties to allow you to change background colors.  Look for property nodes for active cell, and cell background color.

0 Kudos
Message 2 of 6
(2,629 Views)

your description is a bit unprecise:

are the cells to be hi-lighted, because of their cell value e.g. (33),

or are the cells to be hi-lighted because of the cell's index e.g. (row:0 col:2)

2d table.png

 

Personally,

I also would use paul_cardinales approach based on an array of clusters

instead of a 2d string table

 

 

0 Kudos
Message 3 of 6
(2,596 Views)

Hello MarcLee!

Did you manage to solve the issue? Did the posts turn out to be helpful?

0 Kudos
Message 4 of 6
(2,578 Views)

Another, neat work around it is essentially drawing the array instead of using the indicator, that way you can make it into heatmap or contour plot or whatever you want and use any color and any style. There are tons of really nice toolkits for that in VIPM, one that I can think of is called "Advanced Plotting Toolkit"!

0 Kudos
Message 5 of 6
(2,573 Views)

Thank you all for the advices.

0 Kudos
Message 6 of 6
(2,547 Views)