LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Selection does not work in large tables

Very small example.
A panel with two-columns CVI table inside.
Before calling DisplayPanel(), add a line of code:

InsertTableRows( panelHandle, PANEL_TABLE, -1, 32768, VAL_USE_MASTER_CELL_TYPE );

Compile with LabWindows/CVI.
Start application.

Go to the end of table.

1. Press Shift/Up-Arrow. Selection does not work.
2. Move one row up. Press Shift/Up-Arrow. Selection works!
3. Move to the 1-st column of 32767-th row.
Press Shift/Left-Arrow and then Shift/Down-Arrow, and voila!
FATAL RUN-TIME ERROR
The program has caused a 'General Protection' fault...

Any ideas?
Than you in advance.
0 Kudos
Message 1 of 4
(3,427 Views)
Hello Oleg,

I think it's because of the limitation of multiple cell selection in tables in CVI, but I have to confirm that.

It's possible that in the background, whenever a column is selected the flag at index of corresponding array is changed. Since the maximum number of elements in an array is defined by a "int" the maximum number of elements it can have is 32678 - 1. I will look more into the problem to find out the actual cause of the error.

- Reajiv
0 Kudos
Message 2 of 4
(3,398 Views)
Oleg,

There is indeed a bug when you try to include in the table selection any cells beyond the 32767th row or column.

This will be fixed in the next version of CVI, but unfortunately there is no workaround that I can think of.

In the meanwhile, if you would just like to *show* the selection, you should be able to set the selection programmatically to any cell range, using the SetTableSelection functions. But if you need to allow the end user to change the selection interactively, then you will run into this bug.

Thanks for reporting this. I am terribly sorry for the inconvenience.

Luis
NI
Message 3 of 4
(3,397 Views)
Dear Luis,

Thank you very much for your kind response.

It looks like both SetTableSelection() and GetTableSelection()
work fine for large areas.

I'm looking forward for new version of Measurement Studio/CVI.

Best regards,
--
Oleg
0 Kudos
Message 4 of 4
(3,377 Views)