LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I pass the 'value' parameter to the getindexfromvalue function?

Manuals / Online help only show parameters for panel, control ID and pointer to index for output, then '...'.
No input for the value to be looked up.
0 Kudos
Message 1 of 3
(2,855 Views)
When ever you see, "any type (by value)" it means the argument in a void type. We do this because a list can have values that are integers, double values, or strings. So, it depends on what data type you are using for the list. If the values are integers, you would just pass an integer, like:
GetIndexFromValue(panelHandle, PANEL_LIST, &index, 1);
or
int value = 1;
GetIndexFromValue(panelHandle, PANEL_LIST, &index, value);


If the values are strings, you would just pass an string, like:
GetIndexFromValue(panelHandle, PANEL_LIST, &index, "value");
or
char str[10] = "value";
GetIndexFromValue(panelHandle, PANEL_LIST, &index, str);

Best Regards,

Chris Matthews
National Instruments
Message 2 of 3
(2,855 Views)
Thanks for that Chris.
0 Kudos
Message 3 of 3
(2,855 Views)