07-19-2005 10:39 AM
07-19-2005 11:05 AM
Hi,
The elements of a list are not available through it's value, but through a property called ItemNames witch is an array of strings. That's why when you save the control values, you don't get back the list items.
The value of the list is the index of the selected element.
So, in this case, to recover the item names of teh list, you have to save the property item names to a file, otherwise you get the value of the control - the index of the selected value.
Paulo
07-19-2005 11:35 AM
07-20-2005 02:36 AM
07-20-2005 02:53 AM
As far as the type descriptor (TD) goes, the ring is a numeric control. Only the enum has its strings included in the TD.
tst a écrit:
Your suggestion sounds like the only plausible way to do this, but to get the values, you will have to get the reference first, which you can't do with Get Controls Values. To get the reference to all the controls, it is not enough to use the VI's Controls[ ] property, because that doesn't give you controls nested in tabs and clusters and so on. You can try opening references based on the names you get from Get Controls Values or going recursively through the VI. You can also try investigating to see if the type descriptor tells you that you're dealing with a listbox (I don't think it does). Try having a look into the OpenG VIs to see if they deal with this.
LabVIEW, C'est LabVIEW
07-20-2005 05:30 PM
Thanks for your help (you can probably tell I'm pushing the limits of my LabVIEW skills).
@tst wrote:
Your suggestion sounds like the only plausible way to do this, but to get the values, you will have to get the reference first, which you can't do with Get Controls Values. To get the reference to all the controls, it is not enough to use the VI's Controls[ ] property, because that doesn't give you controls nested in tabs and clusters and so on. You can try opening references based on the names you get from Get Controls Values or going recursively through the VI. You can also try investigating to see if the type descriptor tells you that you're dealing with a listbox (I don't think it does). Try having a look into the OpenG VIs to see if they deal with this.
07-20-2005 08:57 PM
Tab controls get weird. Tab controls have a property called Pages which is an array of references to the pages in the tab control. One reference for each page. Index out a page reference and wire it to a property node. A page reference has a property called Controls on Page[ ] .
Mike...
07-20-2005 10:36 PM
07-21-2005 02:31 AM
JP, do you know if there are any plans for an OpenG VI which will get the references for *all* the controls on the FP? It sounds like a perfect VI for the application control palette. Then, there could be some VIs based on it, like "Find all ****" (listboxes\tabs\2D arrays\whatever).
For some reason I seem to have a recollection of seeing a debate about doing this recursively (with VIs attached?), but I can't seem to remember where (LAVA?).
07-22-2005 03:55 AM