LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Using SetTableCellRangeVals with non-homogenous table

Hi,
I have a very large table of about 1000 rows and columns of different data types (strings, float,int,images, etc)
Currently, I'm loading this table using SetTableCellAttribute and am using other optimization techniques like hiding the table before displaying it and creating all the rows in the begining.
But this is still really slow, it takes about 45secs for the table to load.

Is there any way that I can use SetTableCellRangeVals in this case?
I cannot load a column at a time as this causes too many iterations over the data which is stored in C++ STL datatype vector. ( I am using LabWindows with Visual C++)
Is there a way to convert all the data to string type and display it by calling SetTableCellRangeVals ?

Any help/tips will be highly appreciated!
Thanks.
0 Kudos
Message 1 of 4
(3,346 Views)
Of course, you could try to convert everything to strings but I wouldn't. Converting to strings isn't very fast either and you have to pick fixed numeric formats. I'm not sure I understand your datatype problem as to why you can't fill by column, but assuming you can't; I would pull the data out of the STL vector, and put it into temporary variables of 1-D arrays for each column. Then use the SetTableCellRangeVals on those arrays.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 2 of 4
(3,344 Views)
Hi Chris,
Thanks for your response.
But I'm not sure if I understood it right.
Isnt this the same as filling a column at a time?

Thanks,
Swati
0 Kudos
Message 3 of 4
(3,339 Views)
Yes, but what I was saying is that if your datatype is preventing you from filling a column at a time, then move the data to another temporary datatype so you can. Filling columnwise will be the only thing that gives you significant performance increase, at least that I can think of.

Chris
0 Kudos
Message 4 of 4
(3,335 Views)