LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What's the best way to customize Control Captions?

My goal is to create a panel where the labels will refer to different I/O on my tester.  I want the caption of that same control to reflect the specific function of the product under test which is connected to the tester I/O.
 
 
So far I've come up with this methodology.
 
 
Store labels and captions in a CSV file.
Read control labels and captions from file and  store them in arrays
Create array of control references of all controls on front panel using property nodes
Set all Captions to empty strings
Cycle through control references
    for each control reference cycle through control labels read from file
    if label of referenced control == control label from file, set caption of referenced control to control caption read from file
 
 
I've attached a LLB written in LV 8.2 that tests this methodology.  sample_panel2.vi is the top level VI.
 
Is there a better way to do this?  I've learned a lot in putting this together, but I'm curious to know if there's something already that get me what I need.
 
Also one other problem I ran into is getting all of the controls that are inside of clusters since the Pnl.Controls[] property doesn't return controls that are inside clusters.  It only returns a reference to the cluster itself.  I know that I can use a property to return references to controls in a cluster but what happens if I have a cluster within a cluster?
 
Arvont
Download All
0 Kudos
Message 1 of 4
(2,857 Views)

Arvont wrote:

...
Also one other problem I ran into is getting all of the controls that are inside of clusters since the Pnl.Controls[] property doesn't return controls that are inside clusters.  It only returns a reference to the cluster itself.  I know that I can use a property to return references to controls in a cluster but what happens if I have a cluster within a cluster?
 
Arvont


Hi Arvont,

see this link please.

http://forums.ni.com/ni/board/message?board.id=170&message.id=139227&query.id=126610#M139227

It shows how you can get all elements, also inside a cluster.

 

Mike

Message 2 of 4
(2,843 Views)

Also see:

http://zone.ni.com/devzone/cda/epd/p/id/2902

 

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 3 of 4
(2,830 Views)

Arvont wrote: 
.... 
Also one other problem I ran into is getting all of the controls that are inside of clusters since the Pnl.Controls[] property doesn't return controls that are inside clusters.  It only returns a reference to the cluster itself.  I know that I can use a property to return references to controls in a cluster but what happens if I have a cluster within a cluster?
 
Arvont

 

Please take a look at this Nugget where I illustrate how to get refs within clusters ... in arrays of clusters... in arrays of clusters of arrays of clusters of clusters.... etc.

 

Ben

Message Edited by Ben on 04-16-2009 05:53 AM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 4
(2,826 Views)