LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Cluster Attributes

All,

 

I did not see any previous questions about this, or I am just searching for the wrong keywords.

 

What I have (LabView 2011, RT) is a control I created that is a cluster made up of 6 boolean led's and 25 string indicators.

 

What I want to do is change the color of the text or background of each string indicator. Worst case 25 different colors etc..

 

I am passing the control to a sub vi which is able to make the modifications to the color etc. 

 

But when I pass the indicator back to the calling vi, the attributes are default (the text is updated).

 

I believe if I pass a reference instead from the calling vi to the sub vi will do what I want, but I do not know how to access the attributes (in the sub vi, via reference).

 

Any help would be appreciated.

 

Thanks

 

0 Kudos
Message 1 of 8
(2,827 Views)

Yes, you would need to pass the refernce to the control. With that reference you can get the references of teh controls contained within the cluster. From there you can wire those references to property nodes and adjust the atributes.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 8
(2,826 Views)

Why are you trying to change text colors on an RT front panel?  Probably not a good idea, you may not get the display you expect when you build it into an executable.  An RT application does not have a front panel until a remote front panel connection is established, so property nodes will not update and may generate errors when there is no front panel connection.  If you attempt to update the color of text in an RT application and later connect with a remote front panel, you will not see that color change because it was set prior to opening the remote connection.

0 Kudos
Message 3 of 8
(2,819 Views)

I am not changing any color on the RT side of the world (it's headless). The GUI that is changing is on the Windows side. 

 

Does anyone have an example to illustrate?

 

Thanks

0 Kudos
Message 4 of 8
(2,796 Views)

Hi Carmine,

 


I am passing the control to a sub vi which is able to make the modifications to the color etc. 

But when I pass the indicator back to the calling vi, the attributes are default (the text is updated).


Well, setting the properties of an indicator in the subVI will not magically change the appearance of an indicator in your main VI!

 


I believe if I pass a reference instead from the calling vi to the sub vi will do what I want, but I do not know how to access the attributes (in the sub vi, via reference).


You use that reference the same way as in the mainVI: just connect it to property nodes...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 8
(2,787 Views)

I can change the value of the cluster elements and the color of the text in the sub-vi (no problem).

 

But I am still not able to pass those changes to the referenced cluster that I passed in. The property node does not contain a Text.Text Colors Property.

 

Where am I going wrong?

 

Thanks

0 Kudos
Message 6 of 8
(2,763 Views)

Probably you used a generic reference and not a typed reference of that cluster...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 8
(2,757 Views)

Based on the replies and a new search I found the following which got me over the hump:

 

https://decibel.ni.com/content/docs/DOC-14562

 

 

Thanks to all

0 Kudos
Message 8 of 8
(2,741 Views)