06-14-2020 05:07 AM
Hi everyone. I think that topic's haeadline explains my problem quite well. The below sequence works well for all controls which are active. Those control elements which are deactivated or deactivated and greyed out are not included in the Elements[] arrray.
Any ideas?
Solved! Go to Solution.
06-14-2020 08:36 AM
I can't replicate that behaviour in LV2015 32-bit on Windows 10. I've tried using Panel - AllObjs[] and Panel - Controls[] and get the same result: all controls are returned whether enabled or disabled. Which LV version are you using?
Just as an aside, I find that closing the VI reference before the Panel reference results in an invalid object reference error (1055) if the VI is not already loaded in memory. In general references should be closed only when other items that rely on that reference are no longer needed.
PsyenceFact
06-14-2020 02:44 PM
Dear PsyenceFact,
after having doen this many times, I went through my project once again and - stupid me - found my mistake. I had filtered out all controls which are not enabled in thethe sub-vi that works on the array of controls. I am really sorry that I caused you this reply work.
So LV is working correctly. It was may mistake.
Thanks for your "aside" remark. I will do changes on my code, but it worked well so far - obviously because the vi was already laoded into memory.
06-15-2020 06:59 AM
@Volker64 wrote:
Dear PsyenceFact,
after having doen this many times, I went through my project once again and - stupid me - found my mistake. I had filtered out all controls which are not enabled in thethe sub-vi that works on the array of controls. I am really sorry that I caused you this reply work.
So LV is working correctly. It was may mistake.
Thanks for your "aside" remark. I will do changes on my code, but it worked well so far - obviously because the vi was already laoded into memory.
Don't be sorry - this whole topic was about helping you find the solution! The discussion convinced you that there must be something wrong with your code, even if you couldn't spot it right away. So you went over your code with a fine-toothed comb and you found the bug. I'd say this is a win for everyone! 🙂