07-28-2015 06:44 AM
Hi there!
I have a front panel with many (and I mean many!) boolean arrays in tabs, and I want the option to save the values selected by the user to a .cfg file, which will be used to make the same selection again without the tedium of clicking on buttons. The only controls I want to save the value of are 1D boolean arrays of length 7 or 11, and these occur only on some of the tab pages; the others have been setup so that on their iteration a false criteria is met and no code executes.
I have managed to get references to each control in each tab, and using a 'more specific class' function to narrow it down to Array controls only. However, when this runs, an error from 'convert variant to data' pops up, and use of a probe tells me the reference being called by my property node at the time of the error is that of an array INDICATOR, rather than a control. I thought the 'controls on page' node and subsequently the array control class specifier would mean that references for other types of array wouldn't make it into the true case where the saving to config file happens.
The indicator in question is an array of a cluster of two strings and a string array, if that makes any sense/has any relevancy, and the error occurs on iteration 1 of the outer loop and iteration 21 of the inner loop, corresponding to the 22nd control reference from the second tab.
I hope I've made the problem clear.
Solved! Go to Solution.
07-28-2015 06:47 AM
Okay as soon as i posted it i realised that controls on page returns controls and indicators. Any way to seperate these so that only controls are referenced?
07-28-2015 07:01 AM
There is a property called Is Control? (or Is Indicator?) that will help you sort them out. I do not recall the exact name of the property but that should get you close enough to find it.
Lynn
07-28-2015 07:19 AM
Yep there's an 'Indicator' property, thanks very much!