LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't Write to Label.Text Property Node

Craig,
What you need to do is raise the refnum to a more specific class using the To More Specific Class function. You will need to wire a cluster refnum to the target class input of the function. Then you can use the controls[] property just like you would for a property node on the diagram for that object. See the attached example that should demonstrate what I mean.

Hope this helps,
Brian
0 Kudos
Message 15 of 17
(2,262 Views)
yup ...

that's the ticket ...

very cool !
0 Kudos
Message 16 of 17
(2,262 Views)
> any ideas? yes, this is a pretty obscure thing to want to do, and no,
> I don't want to change the caption.
>


If the reference to the cluster doesn't contain an array of controls[]
references, then its type isn't a reference to a cluster. You might
need to cast it to more specific, and wire up a cluster class constant.
The output wire will go into a property node and let you access the
controls[]. If there is no error at runtime, indicating this is indeed
a cluster, then it should do what you want.

Greg McKaskle
0 Kudos
Message 17 of 17
(2,262 Views)
> I am unable to WRITE text into a Label.Text Property Node - I have no
> trouble reading out but for some reason can not write in. Has anyone
> else encountered this?

I don't like answering a question with another question, but why are you
wanting to do this? The label is part of your program in addition to being
part of the panel. It affects the name of data that flows to the diagram
and is returned to the caller. If you intend to change the name for the
UI only, then use a caption instead. Popup on the control, choose Visible
Parts>> Caption, and this is purely panel. It can be localized or changed
at runtime.

Greg McKaskle
Message 8 of 17
(2,467 Views)
Use the "caption" in the same way you intended to use the label.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 10 of 17
(2,467 Views)
I must have been answering at the same time as Greg. See his answer.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 11 of 17
(2,262 Views)
I've encountered exactly the same problem. Thank goodness it's been answered. I'm happy to use Caption rather than Label - this works fine for me. But why isn't this problem documented by Nation Instruments? And why does the property node Label.Text accept an input that (as far as I am aware) is ignored?! Worse than this, it appears occasionally to crash LabView 6i without warning or explanation!
0 Kudos
Message 13 of 17
(2,262 Views)