LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

GetTableCellRangeVals()

I have a table with a mix of strings,doubles and ints. I've decleared a stuct with the same structure as the colums in the table.

I'm trying to call GetTableCellRangeVals() with that struct as the the argument "value array", but the compiler complains at runtime.

How can I read out all 11 colums in a row in one call ?

 

The struct is decleared as below :

typedef struct
  {
    char   ArticleNo[MAX_TYPE_TEXT],
             TypeDescription[MAX_TYPE_TEXT],
             Group[MAX_GROUP_TEXT];
    double size,
              prs,
             Cost,
             time,
             weight;
    char   Make[MAX_FABR_TEXT];
    int    qty,
           prv;
}ARTICLELINE;

 

Regards Per

0 Kudos
Message 1 of 2
(2,735 Views)

Hello Per,

 

Unfortunately that function only works with arrays, and for that to work, all columns have to use the same cell type and data type. You cannot pass a structure to the function. This means that you have to get one column at a time, using GetTableCellVal.

 

This is discussed in more detail in this thread. It refers to the Set... function, but the same could be said for the Get... function.

 

If it's any consolation, it really isn't that much more efficient to get one cell at a time, rather than all at once. It makes a significant difference when you are setting values (because of the intermediate drawing operations), but it doesn't make that much of a difference when getting them.

 

Luis

0 Kudos
Message 2 of 2
(2,732 Views)