LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get all control references of a panel returns different things on different PCs

Hi all,

for initialization I have task to do with many of my controls on the front panel. So I use the property node of the front panel to get an array of references to the controls.

All worked fine but now I structured my controls using a tab control. The very strange thing is, that on my development computer all works but on the "production" system it doesn't. I found the reason: on the production system I just get a reference to the tab control itself but not to the controls inside the tab control. I know how to get all controls inside the tab control -- that's not the problem.

But I'd like to know, why two computers behave differently?

I use LV 7.0 DSC (on
the production system all runs in LV 7.0 DSC RTS). I tested the application using the dev system and the runtime system on both systems: on the the dev system I get the controls inside the tab control and on the "production" system I don't. Identical ".exe", identical code, identical installation base, alway reproducable, no difference between dev system and run time system but between the two computers.

What could be different and have an influence?

Thanks for any idea.

Cheers,
Carsten
0 Kudos
Message 1 of 4
(2,983 Views)
I tried a few different versions of LabVIEW, and I never get controls that are inside a tab control directly from the front panel's Controls[] property. So I'm guessing there is something odd about your development system.

One possibility is the ini file (I assume both are Windows). I can't think of a configuration option that would change this, but try deleting/renaming your ini file in your development machine.
0 Kudos
Message 2 of 4
(2,983 Views)
Hi,

normally the use of the property node of the front panel to get an array of references to the controls is not really common. This could be the reason for the different behavior of the two computer.

You can find here a link which describes the normal way of use tab controls.

http://digital.ni.com/public.nsf/websearch/D7A289CB44CD1EAB86256DC0007E4195?OpenDocument

But if you want you can attach your solution here because normally it is not possible to use just the property node of the front panel so easily.

Regards

Thorsten R.
NI Germany
(SRQ 198152)
0 Kudos
Message 3 of 4
(2,983 Views)
Hi,

I just changed my code to return all refnums as this:

* use the property node of the front panel to get an array of references of the controls of the front panel
* test each refnum, if it refers to a tab control
* if it refers to a tab control retrieve the refnums to all controls inside the tab using the property node for the tab control and attach them to the original array
* by using a shift register in a while loop I do this recursively to fetch the controls inside a tab control inside another tab control... too.

So far it works good.

Thanks for your comment.

Cheers,

Carsten

PS: I don't want to use an explicit property node of a control! Doing it this way, I don't have to change anything of my code if I add another c
ontrol that has to be considered in my initialization procedure -- it just has to have the right name. And I don't want to change my code if I decide to reorder my controls (e.g. to group them using tab controls).
0 Kudos
Message 4 of 4
(2,983 Views)