06-15-2012 08:52 AM
HI, is there a way to know hoy many fields of a 2D array are colored?
i want to count ta painted fields of this table
regards
Solved! Go to Solution.
06-15-2012 08:59 AM
You can use for loops to set the active cell and then read the background color for each cell using a property node.
Then just check to see if the color matches what you're looking for.
Rob
06-15-2012 09:20 AM
you mean put the array in a for loop in order to get the cells and with that set the active cell?
do you have an example so i can check it out?
thanks a lot
06-15-2012 03:53 PM
You have to check each cell and see which ones have the color you're looking for. Sort of like this:
Interesting that it replaced the reference with a reference control. Data Table 2 should be a reference to Data Table.
Rob
06-15-2012 03:56 PM
@Robert Cole wrote:
Interesting that it replaced the reference with a reference control. Data Table 2 should be a reference to Data Table.
Rob
Use the Code Capture Tool. It doesn't have that problem the way the VI Snippet built into LabVIEW does.
06-18-2012 07:48 AM
THANKS FOR HELPING 😉
06-20-2012 01:21 PM
I have a 1D array of Booleans. How do I count how many times True came up?
06-20-2012 02:47 PM
Maybe this can help, it almost the same code as the above one
06-20-2012 02:52 PM - edited 06-20-2012 02:55 PM
@Eric1977 wrote:
I have a 1D array of Booleans. How do I count how many times True came up?
FIrst of all, you should start a new thread, because the current thread is marked as solved and this is a new problem.
All you need is the following.
(If the array will be larger than the range of I16, insert a to_I32 before summing.)
06-20-2012 02:59 PM - edited 06-20-2012 03:01 PM
@Tokyghy wrote:
Maybe this can help, it almost the same code as the above one
This is way too convoluted!
Hmm.... ever wondered what would happen if you would remove the "equal TRUE" and simply wire right across to the select node???? Scratching head....
(See also everything ever posted in the Rube Goldberg thread)