From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reference on all panel elements does not include deactivated controls

Solved!
Go to solution

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?

 

Volker64_0-1592129033523.png

 

0 Kudos
Message 1 of 4
(2,030 Views)

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

0 Kudos
Message 2 of 4
(1,996 Views)
Solution
Accepted by topic author Volker64

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.

 

0 Kudos
Message 3 of 4
(1,966 Views)

@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!  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 4
(1,914 Views)